Java Quick Reference
  Language Fundamentals
  Operators and Assignments
  Flow Control and Exceptions
  Declarations and Access Control
  Garbage Collection
  Overloading and Overriding
  Threads
  The java.lang Package
  The java.util Package
  The java.awt Package
  The java.io Package
  References
  Miscellaneous Notes
  Tips & Traps
  Mock Exams

Declarations and Access Control - Access Modifiers

Modifier Used with Description
public Classes
Interfaces
Constructors
Inner Classes
Methods
Field variables
A Class or Interface may be accessed from outside its package.
Constructors, Inner Classes, Methods and Field variables may be accessed from wherever their class is accessed.
protected Constructors
Inner Classes
Methods
Field variables
May be accessed by other classes in the same package or from any subclasses of the class in which they are declared.
private Constructors
Inner Classes
Methods
Field variables
May be accessed only from within the class in which they are declared.
no modifier Classes
Interfaces
Constructors
Inner Classes
Methods
Field variables
May only be accessed from within the package in which they are declared.
Access Modifiers Special Modifiers this and super Scope Inheritance Access Control