Which access modifier makes a member accessible only within its own class?

Java Associate Easy

Java Associate — Easy

Which access modifier makes a member accessible only within its own class?

Key points

  • Private access modifier restricts access to the class itself.
  • It enhances encapsulation by hiding implementation details.
  • Other classes cannot directly access private members.

Ready to go further?

Related questions