1.

Which of the following annotation of JAX RS API binds the parameter passed to method to a HTTP matrix parameter in path?(a) @PathParam(b) @QueryParam(c) @MatrixParam(d) @HeaderParamI have been asked this question during an internship interview.This interesting question is from Web Caching in portion Networking of Computer Network

Answer» CORRECT choice is (c) @MatrixParam

Explanation: @MatrixParam is the annotation that binds the parameter PASSED to method to a HTTP matrix parameter in PATH, while @QueryParam binds to a query parameter, @PathParam binds to a VALUE and @HeaderParam binds to the HTTP header in the path.


Discussion

No Comment Found

Related InterviewSolutions