Spring Mock Test



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 III

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

Answer : D

Explanation

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

Answer : C

Explanation

Spring supports both XML Schema based and @AspectJ based aspect implementation.

Q 11 - What are the types of the transaction management Spring supports?

A - Programmatic transaction management

B - Declarative transaction management

C - Both of above.

D - None of above.

Answer : C

Explanation

Spring supports both Programmatic and Declarative transaction management.

Answer : C

Explanation

Hibernate can be accessed by both ways either using Inversion of Control with a Hibernate Template and Callback or extending HibernateDAOSupport and applying an AOP Interceptor node.

Answer : D

Explanation

Spring supports all the mentioned ORMs.

Q 16 - 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 17 - How to get object of a service in spring framework?

A - Using new keyword

B - Using dependency injection

Answer : B

Explanation

In spring, dependency injection is used to get any object.

Q 18 - Which of the following is part of Data Access layer in Spring framework?

A - Beans

B - Aspects

C - JMS

D - Context

Answer : C

Explanation

JMS is the part of Data Access layer in Spring framework.

Answer : C

Explanation

ref is used to reference already defined bean and it can be used using both setter method and constructor argument.

Q 20 - 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 21 - SpEL is part of core container.

A - False

B - True

Answer : B

Explanation

SpEL is a part of core container.

Answer : C

Explanation

ApplicationContext class acts as IoC Container.

Answer : A

Explanation

Spring framework is a light weight framework.

Q 24 - 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 25 - Can we integrate Struts with Spring.

A - Yes

B - No

Answer : A

Explanation

Struts can be integrated with spring.

Answer Sheet

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