Important Object Methods

Casting

Java

Packages

Visibility

Visibility Applied to Classes Applied to Class Members
private Applicable to inner classes. Accessible only to members of the class in which it is declared. Visible only within this class.
default or package Visible to classes in this package. Visible to classes in this package.
protected Applicable to inner classes. Visible to classes in this package and to classes outside the package that extend the class in which it is declared. Visible to classes in this package and to classes outside the package that extend this class.
public Visible to all classes. Visible to all classes. The class defining the member must also be public.

Lecture Code

Abstract Class Demonstration

Package Demonstration