Choose the option that describes what would happen if this class were deployed (Choose one):
A.
Any HTTP GET or POST request with the URL “/resource” would result in a call to getName().
B.
Any HTTP GET or POST request with URLs that begin with “/resource” would result in a call to
getName().
C.
A runtime error would result, since a method cannot be responsible for both GET and POST
requests.
D.
A compile error would result, since a method cannot be responsible for both GET and POST
requests.
Explanation:
C, the method throw a Jersey Exeception
it is A only. You can have both get n post with no runtime error
“You can have both get n post with no runtime error” – how?
I also get runtime error in Jersey when both @GET and @POST annotates the same method.