Choose the URL path that would result in a call to getToken()? (Choose one)

Given the class:

Choose the URL path that would result in a call to getToken()? (Choose one)

Given the class:

Choose the URL path that would result in a call to getToken()? (Choose one)

A.
/id/value

B.
/resource/id

C.
/resource/id/name

D.
/resource/id/value/token



Leave a Reply 7

Your email address will not be published. Required fields are marked *


jane

jane

I think that the correct answer here is B, not C

gfrascadore

gfrascadore

Yes you are on right

Rock

Rock

Correct answer c. It is: @Path(“id/{value}”) @Get

Sh4r4ith

Sh4r4ith

Thanks for the tip Rock I love you

Evgen

Evgen

But there is “@Path(“id”)” in the question, not a “@Path(“id/{value}”)”.
I think too, B is correct.

Mohamed Fayek Saber

Mohamed Fayek Saber

B is correct

Leo Yu

Leo Yu

not a good question, the exam point is the correct PathParam, the annotation looks like below, otherwise Path(“/resource/id/nameValue”) doesn’t make sense.

@Path(“/resource”)
class Resource{
@GET
@Path(“/id”)
@Produce(“APPICATION_XML”)
public String getToken(@PathParam String nameValue){

}