Advanced Java Programming (3160707) MCQs

MCQs of Java Web Frameworks: Spring MVC

Showing 1 to 10 out of 22 Questions
1.
MVC is composed of which 3 components?
(a) Model Variable Controller
(b) Member View Controller
(c) Model View Controller
(d) Model View Control
Answer:

Option (c)

2.
In an MVC architecture the ______ handles all requests.
(a) Model
(b) View
(c) Controller
(d) Interface
Answer:

Option (c)

3.
What do you mean by Dependency Injection?
(a) It is a design pattern which implements Inversion of Control for software applications.
(b) It is one of the spring module.
(c) It is a technique to get dependencies of any project.
(d) It is used to promote tight coupling in code.
Answer:

Option (a)

4.
Spring uses a ______defined in the web.xml file to analyse a request URL pattern and then pass control to the correct controller.
(a) Managed Bean
(b) Dispatcher Servlet
(c) POJO file
(d) Model
Answer:

Option (b)

5.
Which annotation is required to design a managed bean class in spring MVC?
(a) @ModelAttribute
(b) @RequestParam
(c) @ManagedBean
(d) @ModelObject
Answer:

Option (c)

6.
Which of the following component intercepts all requests in a Spring MVC application?
(a) Managed Bean
(b) Dispatcher Servlet
(c) POJO file
(d) Model
Answer:

Option (b)

7.
______ component is used to map a request to a method of a controller.
(a) URLMapper
(b) RequestMapper
(c) RequestResolver
(d) RequestMapping
Answer:

Option (d)

8.
_____cannot be the return type of a request processing method of a controller.
(a) String
(b) Void
(c) Object
(d) Model
Answer:

Option (c)

9.
Which annotation is required to receive a model object initialized by the request parameters, in a request processing method?
(a) @ModelAttribute
(b) @RequestParam
(c) @ManagedBean
(d) @ModelObject
Answer:

Option (a)

10.
Which of the following is required to load the beans configured in applicationContext.xml file?
(a) ContextLoader
(b) ApplicationContextLoader
(c) ContextLoaderListener
(d) BeanLoader
Answer:

Option (c)

Showing 1 to 10 out of 22 Questions