Home page

Monday, August 26, 2019

Access Modifiers in JAVA


Access Modifier Type Accessible
Private----------------------> Within class
Protected-------------------> 1. Within class
2. Within package
3. Subclass of another package
Public-----------------------> Accessible to all classes
No Access Modifier----------> 1. Within class
2. Within package

2 comments: