Which Retrofit annotation adds ?userId=1 to the URL?

  1. @Field
  2. @Query
  3. @Path
  4. @Body
Answer

B) @Query

@Query adds query parameters.

Computer Science MCQ · More Maps and Consuming Web Services over HTTP MCQs · Practise