Choose the code fragment that corresponds to a resource delegating processing of a request to a subresource correctly, when processing the URL “/parent/child” (Choose one):
A.
@Path(“/parent”)
class Parent {
@Path(“/child”)
Child getChild() { return new Child(); }
}
class Child {
@GET String getName() { return “name”; }
}
B.
@Path(“/parent”)
class Parent {
@GET @Path(“/child”)
Child getChild() { return new Child(); }
}
class Child {
@GET String getName() { return “name”; }
}
C.
@Path(“/parent”)
class Parent {
@Path(“/child”)
Child getChild() { return new Child(); }
}
@Path(“/child”)
class Child {
@GET String getName() { return “name”; }
}
D.
@Path(“/parent”)
class Parent {
@Path(“/child”)
Child getChild() { return new Child(); }
}
class Child {
String getName() { return “name”; }
}
A is false. There is not the anotetion @GET or @POST
Come on, see: https://jersey.java.net/documentation/latest/jaxrs-resources.html
Guess A is correct