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

Beans, Core, Context, SpEL are the modules in core container.

Answer : A

Explanation

Spring supports Constructor based, Setter based injections.

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 : D

Explanation

Before, after, after-returning, after-throwing, around are the five types of advice that spring supports.

Q 7 - Which of the following database is not supported using jdbcTemplate?

A - MySql

B - PostgresSql

C - NoSql

D - Oracle

Answer : C

Explanation

NoSql is not supported using jdbcTemplate.

Q 8 - By default a bean is lazily loaded.

A - True

B - False

Answer : B

Explanation

By default a bean is eagerly loaded.

Answer : D

Explanation

Life cycle of a bean can be controlled using init() method or using InitializingBean / DisposableBean classes.

Q 10 - Following class can be extended to create custom event in spring.

A - SpringEvent

B - Event

C - ApplicationEvent

D - None of above

Answer : C

Explanation

ApplicationEvent is used to create custom events.

spring_questions_answers.htm
Advertisements