What is access modifier?

1 answer

Answer

1145767

2026-06-11 12:50

+ Follow

An Access Modifier is a key Word in Java that determines what level of access or visibility a particular Java variable/method or class has. There are 4 basic access modifiers in Java. They are:

1. Public

2. Protected

Java
Java

3. Default and

4. Private

Private is the most restrictive access modifier whereas public is the least restrictive. Default is the access protection you get when you do not specifically mention an access modifier to be used for a Java object.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.