Access Modifiers
There are 4 types of java access modifiers:
1) private access modifier

2) default access modifier

3) protected access modifier
The protected access modifier is accessible within package and outside the package but through inheritance only.
The protected access modifier can be applied on the data member, method and constructor. It can't be applied on the class.

4) public access modifier



Last updated