Exam 1z0-900 All QuestionsBrowse all questions from this exam
Question 38

Which statement is true about JAX-RS resource implementation?

    Correct Answer: C

    JAX-RS resource classes can be implemented as Plain Old Java Objects (POJOs). This is in alignment with the principles of JAX-RS, which emphasizes simplicity and makes it possible to create RESTful web services without the need for complex inheritance structures or dependencies on other frameworks. While the resource classes can be components like Enterprise JavaBeans (EJBs), there's no strict requirement that they must extend any particular class. Therefore, the most accurate statement is that the REST resource class can be implemented as a POJO.

Discussion
devmsalehOption: C

C is the correct answer According to https://docs.oracle.com/javaee/7/tutorial/jaxrs002.htm

peteVlnOption: A

Here I would say that we should focus on asking about the implementation of the resource. Therefore I choose answer A.

LeoAliothOption: A

A is correct (must extend the javax.ws.rs.core.Application) but so in C (can be implemented as a Plain Old Java Object (POJO))

orjava

You can extend Application or use web.xml to map so option A (must) is not correct.