This preview shows page 1. Sign up to view the full content.
Unformatted text preview: private members CAN ONLY access. protected CAN be accessed from same package and a subclass existing in any package can access. Access Control Modifiers: Java provides a number of access modifiers to set access levels for classes, variables, methods and constructors. The four access levels are: 1. Visible to the package. the default. No modifiers are needed. 2. Visible to the class only (private). 3. Visible to the world (public). 4. Visible to the package and all subclasses (protected). Non Access Modifiers: Java provides a number of non-access modifiers to achieve many other functionality. The static modifier for creating class methods and variables The final modifier for finalizing the implementations of classes, methods, and variables. The abstract modifier for creating abstract classes and methods. The synchronized and volatile modifiers, which are used for threads....
View Full Document
This note was uploaded on 02/04/2012 for the course ECON 201 taught by Professor Profatera during the Spring '11 term at Albany Medical College.
- Spring '11