- RESTful Tutorial
- RESTful - Home
- RESTful - Introduction
- RESTful - Environment Setup
- RESTful - First Application
- RESTful - Resources
- RESTful - Messages
- RESTful - Addressing
- RESTful - Methods
- RESTful - Statelessness
- RESTful - Caching
- RESTful - Security
- RESTful - Java (JAX-RS)
- RESTful Useful Resources
- RESTful - Questions and Answers
- RESTful - Quick Guide
- RESTful - Useful Resources
- RESTful - Discussion
RESTful Mock Test
This section presents you various set of Mock Tests related to RESTful 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.
RESTful Mock Test IV
Q 1 - Which of the following annotation of JAX RS API binds the parameter passed to method to a HTTP matrix parameter in path?
Answer : C
Explanation
@MatrixParam − Binds the parameter passed to method to a HTTP matrix parameter in path.
Q 2 - Which of the following annotation of JAX RS API binds the parameter passed to method to a HTTP header?
Answer : D
Explanation
@HeaderParam − Binds the parameter passed to method to a HTTP header.
Q 3 - Which of the following annotation of JAX RS API binds the parameter passed to method to a Cookie?
Answer : A
Explanation
@CookieParam − Binds the parameter passed to method to a Cookie.
Q 4 - Which of the following annotation of JAX RS API binds the parameter passed to method to a form value?
Answer : B
Explanation
@FormParam − Binds the parameter passed to method to a form value.
Q 5 - Which of the following annotation of JAX RS API assigns a default value to a parameter passed to method?
Answer : C
Explanation
@DefaultValue − Assigns a default value to a parameter passed to method.
Q 6 - Which of the following annotation of JAX RS API is used to inject a context of the resource for example HTTPRequest as a context
Answer : D
Explanation
@Context − Context of the resource for example HTTPRequest as a context.
Q 7 - REST is web standards based architecture and uses HTTP Protocol for data communication.
Answer : B
Explanation
REST is web standards based architecture and uses HTTP Protocol for data communication.
Q 8 - In REST architecture, a REST Server simply provides access to resources and REST client accesses and presents the resources.
Answer : B
Explanation
In REST architecture, a REST Server simply provides access to resources and REST client accesses and presents the resources.
Q 9 - A web service is a collection of open protocols and standards used for exchanging data between applications or systems.
Answer : A
Explanation
A web service is a collection of open protocols and standards used for exchanging data between applications or systems.
Q 10 - RESTful web services use HTTP methods to implement the concept of REST architecture.
Answer : A
Explanation
RESTful web services use HTTP methods to implement the concept of REST architecture.
Q 11 - A RESTful web service usually defines a URI, Uniform Resource Identifier a service, provides resource representation such as JSON and set of HTTP Methods.
Answer : B
Explanation
A RESTful web service usually defines a URI, Uniform Resource Identifier a service, provides resource representation such as JSON and set of HTTP Methods.
Q 12 - RESTful web services make use of FTP protocol as a medium of communication between client and server.
Answer : B
Explanation
RESTful web services make use of HTTP protocol as a medium of communication between client and server.
Q 13 - A RESTful web service client sends a message in form of a Gopher Request and server responds in form of a HTTP Response.
Answer : B
Explanation
A RESTful web service client sends a message in form of a HTTP Request and server responds in form of a HTTP Response.
Q 14 - URI of HTTP request indicates HTTP methods to be executed by RESTful Web services.
Answer : A
Explanation
HTTP Verb − Indicates HTTP methods such as GET, POST, DELETE, PUT etc.
Q 15 - Request Header - Contains metadata for the HTTP Request message as key-value pairs.
Answer : B
Explanation
Request Header − Contains metadata for the HTTP Request message as key-value pairs.
Answer : B
Explanation
Status/Response Code − Indicate Server status for the requested resource.
Q 17 - Response Header - Contains metadata for the HTTP Response message as key-value pairs.
Answer : A
Explanation
Response Header − Contains metadata for the HTTP Response message as key-value pairs.
Answer : A
Explanation
Request Body − Contains Message content or Resource representation.
Answer : A
Explanation
Each resource in REST architecture is identified by its URI.
Answer : B
Explanation
Purpose of an URI is to locate a resource(s) on the server hosting the web service.
Answer : A
Explanation
Web services can treat each method request independently.
Q 22 - As HTTP is itself a statelessness protocol, RESTful Web services work seamlessly with HTTP protocol.
Answer : A
Explanation
As HTTP is itself a statelessness protocol, RESTful Web services work seamlessly with HTTP protocol.
Answer : B
Explanation
PUT opearations should be idempotent.
Answer : B
Explanation
POST operation can cause different result.
Answer : A
Explanation
GET opearations should be readonly.
Answer Sheet
Question Number | Answer Key |
---|---|
1 | C |
2 | D |
3 | A |
4 | B |
5 | C |
6 | D |
7 | B |
8 | B |
9 | A |
10 | A |
11 | B |
12 | B |
13 | B |
14 | A |
15 | B |
16 | B |
17 | A |
18 | A |
19 | A |
20 | B |
21 | A |
22 | A |
23 | B |
24 | B |
25 | A |
To Continue Learning Please Login
Login with Google