Java Import Class From Another Package. Package statement must be the first statement in source file. The boss class must then use one of the following techniques for referring to a class in a different package.

Hence, it improves the readability of the program. Access static variables in java. Importing classes for the same project.