You can understand it using an example where a Boss class is defined in payroll package.
package payroll; public class Boss { public void payEmployee(Employee e) { e.mailCheck(); } }
if the Employee class is not in the payroll package? The Boss class must then use one of the following techniques for referring to a class in a different package.
payroll.Employee
import payroll.*;
import payroll.Employee;
A class file can contain any number of import statements. The import statements must appear after the package statement and before the class declaration.