In Java, Retrofit requests are executed asynchronously with:

  1. execute() on the main thread
  2. call.enqueue(callback)
  3. startService()
  4. Thread.sleep()
Answer

B) call.enqueue(callback)

enqueue runs the call in the background and calls back onResponse/onFailure.

Computer Science MCQ · More Lab: Displaying Data from an API MCQs · Practise