accessed only from within its class, classes in the same package as its class, and subclasses of its class
private
accessed only from within its class
default (no access specifier)
accessed only from within its class and classes in the same package as its class
existence modifiers
static
one exists for the entire class, rather than one for each object of its class
usage modifiers
final
cannot be changed (i.e., constant or read-only)
Method
access modifers
public
accessed from anywhere the class that contains it
protected
accessed only from within its class, classes in the same package as its class, and subclasses of its class
private
accessed only from within its class
default (no access specifier)
accessed only from within its class and classes in the same package as its class
existence modifiers
static
exists to serve its class, not to serve individual objects of its class; as a consequence, static methods do not have access to instance variables, as instance variables belong to the individual objects; as a further consequence, static methods do not have access to this and super.
usage modifiers
final
cannot be overriden
abstract
must be overriden to be useful
Class
access modifers
public
accessed from within any class
default (no access specifier)
accessed from within any class in the same package