MCQ Single Best Answer Easy

QWhich of the following keywords are used to control access to a class member?

ID: #24252 Elements of Accounting 48 views
Question Info
#24252Q ID
EasyDifficulty
Elements of AccountingTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A default, protected, public
  • B abstract, interface
Correct Answer: Option A

Explanation

Which of the following keywords are used to control access to a class member?

  • default → ✔ (no keyword → package-private access)

  • abstract → ❌ (used for abstract methods/classes, not access control)

  • protected → ✔

  • interface → ❌ (not an access modifier, but a type definition)

  • public → ✔

✅ Correct answers: default, protected, public

Share This Question

Challenge a friend or share with your study group.