Spring Mock Test


Advertisements


This section presents you various set of Mock Tests related to Spring Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

Questions and Answers

Spring Mock Test I

Answer : A

Explanation

Dependency Injection is a design pattern which implements Inversion of Control for software applications.

Answer : A

Explanation

Dependency injection helps in decoupling application objects from each other.

Answer : A

Explanation

AOP stands for Aspect Oriented Programming.

Answer : A

Explanation

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

Answer : A

Explanation

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

Answer : A

Explanation

WebSocket, Servlet, Web, Portlet are the modules of Web layer.

Answer : A

Explanation

Spring supports Constructor based, Setter based injections.

Answer : A

Explanation

BeanFactory, ApplicationContext classes acts as IoC containers in Spring.

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

Answer : A

Explanation

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

Answer : D

Explanation

All of the above statements are correct.

Answer : D

Explanation

All of the above statements are correct.

Answer : A

Explanation

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

Q 25 - 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 Sheet

Question Number Answer Key
1 A
2 D
3 A
4 A
5 A
6 A
7 A
8 A
9 A
10 D
11 D
12 D
13 A
14 A
15 A
16 A
17 D
18 D
19 A
20 A
21 A
22 A
23 A
24 A
25 A

spring_questions_answers.htm

Advertisements
E-Books Store