667: Highlights
- If you want to provide universal access to instance variables and
methods, then mark them with the
public
keyword.
- If you want to limit access to instance variables and methods to the
package in which they are introduced and to subclasses of the class in
which they are introduced, then mark them with the
protected
keyword.
- If you want to limit access to instance variables and methods to the
package in which they are introduced, then do not mark them with the
public
, protected
, or private
keywords.
- If you want to limit access to instance variables and methods to the
class in which they are introduced, then mark them with the
private
keyword.