
Package
Java programs are organized in packages. Java packages play a role simi-
lar to XML namespaces: They prevent naming conflicts.
Packages are declared with the package statement, as in the following
example:
package com.psol.lel;
A package is also a logical unit that groups related classes. Therefore, you
can place all the classes of one application in a single package. In this case,
the
lel package stands for “local end of line.” Large applications may be
split over several packages.
To avoid conflicts in the name of packages, their names should always start
with your domain name in reverse order.
Imports
The name of a class is its package name followed ...