Explore topic-wise MCQs in Spring.

This section includes 18 Mcqs, each offering curated multiple-choice questions to sharpen your Spring knowledge and support exam preparation. Choose a topic below to get started.

1.

The Spring Expression Language can be accessed by:-

A. XML configuration
B. Annotations
C. None of the mentioned
D. All of the mentioned
Answer» E.
2.

We can combine target Object and propertyPath properties as bean name/id of PropertyPathFactoryBean.

A. True
B. False
Answer» B. False
3.

Alternate way of PropertyPathFactoryBean to declare a bean.

A. util:property-path tag
B. util:constant tag
C. None of the mentioned
D. All of the mentioned
Answer» B. util:constant tag
4.

The propertyPath property of PropertyPathFactoryBean can accept only a single property name.

A. True
B. False
Answer» C.
5.

PropertyPathFactoryBean declares a bean from an:-

A. Object Property
B. Property Path
C. All of the mentioned
D. None of the mentioned
Answer» D. None of the mentioned
6.

Inner Bean can be retrieved by it’s name.

A. True
B. False
Answer» C.
7.

Declaring bean form object properties can be done using:-

A. PropertyPathFactoryBean
B. util:constant
C. None of the mentioned
D. All of the mentioned
Answer» B. util:constant
8.

Is this bean configuration correct?

A. Yes
B. NoView Answer
Answer» C.
9.

Which tag is also allowed by static field?

A. util:constant
B. list
C. set
D. constructor-args
Answer» B. list
10.

Is this bean configuration metadata correct?

A. Yes
B. NoView Answer
Answer» B. NoView Answer
11.

As an alternative to specifying the field name in the staticField property explicitly, you can set it as the bean name of FieldRetrievingFactoryBean.

A. True
B. False
Answer» B. False
12.

A)

A. A and B are equivalent
B. A and B provides different functionality
C. Runtime Error in A
D. Exception in BView Answer
Answer» B. A and B provides different functionality
13.

Declaring a bean from a static field requires a built-in factory bean FieldRetrievingFactoryBean and fully qualified field name or instance field is specified in the list property.

A. True
B. False
Answer» C.
14.

Ways to declare bean from a static field?

A. FieldRetrievingFactoryBean
B. util:contant
C. All of the mentioned
D. None of the mentioned
Answer» D. None of the mentioned
15.

Declaring Beans using:-

A. Static field
B. Object Properties
C. All of the mentioned
D. None of the mentioned
Answer» D. None of the mentioned
16.

WHICH_TAG_IS_ALSO_ALLOWED_BY_STATIC_FIELD??$

A. util:constant
B. list
C. set
D. constructor-args
Answer» B. list
17.

Inner Bean can be retrieved by it’s name.$

A. True
B. False
Answer» B. False
18.

A and B are equivalent

A. A and B provides different functionality
B. Runtime Error in A
C. Exception in B
Answer» B. Runtime Error in A