Advanced Java Programming (3160707) MCQs

MCQs of Java Web Frameworks: Spring MVC

Showing 11 to 20 out of 22 Questions
11.
______ should be the return type of a request processing method of a controller to process an AJAX request.
(a) String
(b) Void
(c) Object
(d) Model
Answer:

Option (b)

12.
Which object is used by a request processing method to check validation failure?
(a) ValidationErrors
(b) BindingResult
(c) ValidationBinding
(d) BindingErrors
Answer:

Option (b)

13.
What do you mean by prototype scope?
(a) This scopes the bean definition to a single instance per HTTP Request.
(b) This scopes a single bean definition to have any number of object instances.
(c) This scopes the bean definition to a single instance per HTTP Session.
(d) This scopes the bean definition to a single instance per HTTP Application/ Global session.
Answer:

Option (b)

14.
In spring MVC, what do u mean by Advice?
(a) This is the actual action to be taken either before or after the method execution.
(b) This is the way to instruct object to behave in certain manner.
(c) This is used to inject values in objects.
(d) This is not invoked during program execution by Spring AOP framework.
Answer:

Option (a)

15.
By default a bean is lazily loaded.
(a) True
(b) False
Answer:

Option (b)

16.
_____ class can be used to call Stored Procedures in spring.
(a) SPHelper
(b) SimpleJdbcCall
(c) JdbcTemplateCall
(d) JdbcTemplate
Answer:

Option (b)

17.
Which of the following is the default scope in Spring?
(a) prototype
(b) singleton
(c) request
(d) session
Answer:

Option (b)

18.
Which of the following are spring modules?
1. Core module
2. Web module
3. Spring jar module
4. Test module
5. Spring Lightweight module
6. Data access module
(a) 1,2,3,4
(b) 1,2,4,6
(c) 1,2,5,6
(d) All the listed above
Answer:

Option (b)

19.
The objects that form the backbone of your application and that are managed by the Spring container are called______.
(a) bean
(b) context
(c) application
(d) metadata
Answer:

Option (a)

20.
Which of the following statement is correct:
1. Spring is an open source framework.
2. Spring is heavyweight.
3. Spring supports tight coupling.
4. Spring helps in reducing boiler-plate code.
(a) 1,2,4
(b) 1,4
(c) 1,3,4
(d) 1,3
Answer:

Option (b)

Showing 11 to 20 out of 22 Questions