Mega Code Archive

 
Categories / Java Book / 002 Class
 

0154 Defining a Package

To define a package, include a package command as the first statement in a Java source file. Any classes declared within that file will belong to the specified package. If you omit the package statement, the class names are put into the default package, which has no name.This is the general form of the package statement: package packageName;