Spring Online Quiz



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 is a design pattern which implements Inversion of Control for software applications.

Answer : A

Explanation

FileSystemXmlApplicationContext is the implementation class of ApplicationContext. Other mentioned classes do not exists.

Q 4

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.

Q 7 - What are the types of the transaction management Spring supports?

A - Programmatic transaction management

B - Declarative transaction management

C - Both of above.

D - None of above.

Answer : C

Explanation

Spring supports both Programmatic and Declarative transaction management.

Q 8 - If a bean is created once per Ioc Container, scope is

A - singleton

B - global-session

C - prototype

D - request

Answer : A

Explanation

If a bean is created once per Ioc Container, scope is singleton.

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 is an interface.

spring_questions_answers.htm
Advertisements