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

global-session scope instructs Spring IoC container to create a instance per HTTP application.

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

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 lazily loaded.

A - True

B - False

Answer : B

Explanation

By default a bean is eagerly loaded.

Q 9 - If a bean is scoped to HTTP session, scope is

A - global-session

B - session

C - prototype

D - request

Answer : B

Explanation

If a bean is scoped to HTTP session, scope is session.

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