Multiple choice

Which of the following accessibility modes in Java does not allow a method to access the data members from the non-subclass of the same package?

  1. Protected

  2. Public

  3. Private

  4. No modifier

  5. Virtual

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

This accessibility mode in Java does not allow a method to access the data members from the non-subclass of the same package.