Access specifier in java

Java

1 answer

Answer

1167546

2026-07-25 09:10

+ Follow

Java
Java

There is no such thing as an access specifier in Java. There are access modifiers.

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

3. Default and

4. Private

Private is the most restrictive access modifier whereas public is the least restrictive. The default access modifier if unspecified is to allow access to classes in the current package only, except within an interface where the default is 'public'.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.