Which statement is true about JAX-RS resource implementation?
Which statement is true about JAX-RS resource implementation?
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.
C is the correct answer According to https://docs.oracle.com/javaee/7/tutorial/jaxrs002.htm
Here I would say that we should focus on asking about the implementation of the resource. Therefore I choose answer 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))
You can extend Application or use web.xml to map so option A (must) is not correct.