#You can understand it with the example of defining Boss class in salary package.
package payroll; public class Boss { public void payEmployee(Employee e) { e.mailCheck(); } }
What if the Employee class is not in the payroll package? The Boss class must then use one of the following techniques to reference classes in different packages.
payroll.Employee
import payroll.*;
import payroll.Employee;
The above is the detailed content of Access Java classes in other packages. For more information, please follow other related articles on the PHP Chinese website!