Multiple choice technology platforms and products

The following method gets the Id of the currently checked Radio Button.

  1. getRadioButtonId()

  2. getCheckedRadioButtonId()

  3. getCheckedId()

  4. None of above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

getCheckedRadioButtonId() is the correct RadioGroup method to retrieve the ID of the checked RadioButton. getRadioButtonId() and getCheckedId() are not standard Android methods. The claimed answer B is correct.

AI explanation

getCheckedRadioButtonId() is the method used to retrieve the ID of whichever radio button is currently selected within a RadioGroup, since radio buttons are mutually exclusive and only one can be checked at a time. Made-up method names like getRadioButtonId() or getCheckedId() don't reflect the actual API for this purpose.