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.

Q 2 - Which is the correct implementation class of BeanFactory?

A - XmlBeanFactory

B - ClassPathBeanFactory

C - FileSystemBeanFactory

D - AdvancedBeanFactory

Answer : A

Explanation

XmlBeanFactory is the implementation class of BeanFactory. 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 6 - What are the different points where weaving can be applied?

A - Compile time, load time

B - Compile time, run time

C - Run time

D - Compile time, load Time, Run time

Answer : D

Explanation

Weaving can be applied at Compile time, load Time and Run time.

Q 7 - Core container has AOP as one of its module.

A - True

B - False

Answer : B

Explanation

AOP is not the part of spring core container.

Q 8 - By default a bean is eagerly loaded.

A - False

B - True

Answer : B

Explanation

By default a bean is eagerly loaded.

Q 9 - What is the scope of bean in portlet context?

A - session

B - global-session

C - prototype

D - request

Answer : B

Explanation

Scope of bean in portlet context is global-session.

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