Access control
Applies to methods and variables
public
Any class can access
protected
Only code in the package, or subclasses can access
(blank)
Only code in the package can access
private
Only code written in the class can access
Inheritance still occurs!
Previous slide
Next slide
Back to first slide
View graphic version