Multiple choice technology platforms and products

Choose the correct xml representation of below highlighted java code: CheckBox cbox = new CheckBox(this); cbox.setChecked(true);

  1. Android:state_checked=”true”

  2. android: android:state_checked=”true”

  3. android:state=”true”

  4. android:android:state=”true”

  5. None of above

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

The programmatic call cbox.setChecked(true) does not map to any of the standard built-in XML attributes provided in the incorrect options, making 'None of above' the correct choice since Android uses android:checked=true for XML state initialization.