The R class in Android is used to:

  1. Access resource IDs such as R.layout.activitymain and R.id.tvHello
  2. Run the app
  3. Store user passwords
  4. Start the emulator
Answer

A) Access resource IDs such as R.layout.activitymain and R.id.tvHello

R is generated automatically and holds integer IDs for all resources.

Computer Science MCQ · More Lab: Android Studio Setup and First App MCQs · Practise