Spring Mock Test



This section presents you various set of Mock Tests related to Spring Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

Questions and Answers

Spring Mock Test II

Answer : A

Explanation

Spring supports list, set, map or props tags to inject java collections.

Answer : C

Explanation

<map> tag is used to inject a collection of name-value pairs where name and value can be of any type.

Answer : A

Explanation

Using Bean autowiring, Spring resolve collaborators (other beans) for your bean by inspecting the contents of the BeanFactory without using <constructor-arg> and <property> elements..

Answer : A

Explanation

Autowiring modes are five: no, byName, byType, constructor, autodetect.

Q 13

Can you inject null and empty string values in Spring?

A - Yes

B - No

Answer : A

Explanation

null and empty string values can be injected in spring beans.

Answer : D

Explanation

Add <context:annotation-config/> to bean configuration to turn on annotation wiring.

Answer Sheet

Question Number Answer Key
1 A
2 A
3 B
4 C
5 D
6 A
7 A
8 A
9 B
10 D
11 D
12 C
13 A
14 D
15 C
16 B
17 D
18 C
19 B
20 D
21 C
22 B
23 D
24 C
25 B
spring_questions_answers.htm
Advertisements