Spring Online Quiz


Advertisements

Following quiz provides Multiple Choice Questions (MCQs) related to Spring Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Answer : A

Explanation

Dependency injection helps in decoupling application objects from each other.

Q 3 - What is default scope of bean in Spring framework?

A - singleton

B - prototype

C - request

D - session

Answer : A

Explanation

singleton is the default scope of any spring bean.

Answer : C

Explanation

ref is used to reference already defined bean and it can be used using both setter method and constructor argument.

Q 8 - Expression Language/ SpEL was introduced in which version of spring framework.

A - 1.0

B - 2.0

C - 3.0

D - 4.0

Answer : C

Explanation

Expression Language/ SpEL was introduced in 3.0 version of spring framework.

Q 9

A bean must have id attribute in beans configuration file.

A - True

B - False

Answer : B

Explanation

Id is not a mandatory attribute in beans configuration file.

Answer : B

Explanation

BeanPostProcessor defines callback methods that you can implement to provide your own instantiation logic, dependency-resolution logic etc.

spring_questions_answers.htm
Advertisements