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

JDBC, ORM, OXM, JMS, Transactions are the modules of Data Access/ Integration layer.

Answer : A

Explanation

Spring supports Constructor based, Setter based injections.

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

Q 10 - Which of the following class can be used to execute Sql queries in spring?

B - JDBCHelper

A - JdbcTemplate

C - DBHelper

D - DBTemplate

Answer : B

Explanation

JdbcTemplate class can be used to execute Sql queries in spring.

spring_questions_answers.htm
Advertisements