Explore topic-wise MCQs in Spring.

This section includes 17 Mcqs, each offering curated multiple-choice questions to sharpen your Spring knowledge and support exam preparation. Choose a topic below to get started.

1.

Annotation which allows the Jaxb2Marshaller marshaller to detect a class’s (i.e., object’s) fields.

A. @XmlRootElement
B. @XmlRoot
C. @NotNull
D. None of the mentioned
Answer» B. @XmlRoot
2.

Publishing an application’s data as a REST service requires.

A. @RequestMapping
B. @PathVariable
C. All of the mentioned
D. None of the mentioned
Answer» D. None of the mentioned
3.

TO_CONFIGURE_JAXB2MARSHALLER_MARSHALLER_WE_REQUIRE.?$

A. ClassesToBeBound
B. ContextPath
C. All of the mentioned
D. None of the mentioned
Answer» D. None of the mentioned
4.

Annotation which allows the Jaxb2Marshaller marshaller to detect a class’s (i.e., object’s) fields.$#

A. @XmlRootElement
B. @XmlRoot
C. @NotNull
D. None of the mentioned
Answer» B. @XmlRoot
5.

In_the_case_of_classesToBeBound,_the_classes_assigned_to_this_property,_indicate_the_class_(i.e.,_object)_structure_that_is_to_be_transformed_into_XML.$

A. True
B. False
Answer» B. False
6.

RestTemplate class method which performs an HTTP HEAD operation.

A. headForHeaders(String, Object…)
B. getForObject(String, Class, Object…)
C. postForLocation(String, Object, Object…)
D. postForObject(String, Object, Class, Object…)
Answer» B. getForObject(String, Class, Object‚Äö√Ñ√∂‚àö√묨‚àÇ)
7.

XML tag which represents information related to a REST service request.

A. Result
B. Title
C. None of the mentioned
D. All of the mentioned
Answer» E.
8.

REST service end point comprises an address.

A. starts with http:// and ends with ?
B. starts with http:// and ends with &
C. no certain URL is specified
D. depends upon the platform used
Answer» B. starts with http:// and ends with &
9.

Accessing_a_third-party_REST_service_inside_a_Spring_application.

A. RestTemplate Class
B. ViewResolver
C. InternalViewResolver
D. View
Answer» B. ViewResolver
10.

The marshaller used by MarshallingView belongs to one of a series of XML marshallers?

A. Jaxb2Marshaller
B. XmlBeansMarshaller
C. CastorMarshalle
D. All of the mentioned
Answer» E.
11.

Marshalling is the process of transforming an in-memory representation of an object into a data format.a

A. True
B. False
Answer» B. False
12.

General-purpose class that allows a response to be rendered using a marshaller.

A. MarshallingView
B. Marshalling
C. View
D. All of the mentioned
Answer» B. Marshalling
13.

Notation for defining REST endpoints.

A. { }
B. *
C. All of the mentioned
D. None of the mentioned
Answer» D. None of the mentioned
14.

Annotation added as an input parameter to the handler method.

A. @PathVariable
B. @Path
C. @PathLocale
D. None of the mentioned
Answer» B. @Path
15.

Spring supports a series of mechanisms to generate a REST service payload.

A. True
B. False
Answer» B. False
16.

Publishing an application’s data as a REST service requires.$

A. @RequestMapping
B. @PathVariable
C. All of the mentioned
D. None of the mentioned
Answer» D. None of the mentioned
17.

To publish a REST service with Spring.

A. publishing an application’s data as a REST service
B. accessing data from third-party REST services
C. none of the mentioned
D. all of the mentioned
Answer» E.