The Java Platform Java Runtime Environment Data Types Control Statemets Methods Arrays Classes and Objects Inheritance Constructor Interface Packages & Access Modifiers![]() Packages![]() The package directive![]() The import directive![]() Encapsulation and Access to Class Members![]() Access modifiers![]() Example![]() Recommended Reading Java Collections Framework | Encapsulation and Access to Class MembersIn Java, through the use of the keywords: public, private, protected and a default access modifier. These access modifiers can be used in front of any method or variable; public static void main (String[] args) |