Let's look at the class we called Packages:
package com.packt.learnjava.ch03_fundamentals;
import com.packt.learnjava.ch02_oop.hiding.C;
import com.packt.learnjava.ch02_oop.hiding.D;
public class Packages {
public void method(){
C c = new C();
D d = new D();
}
}
The first line in the Packages class is a package declaration that identifies the class location on the source tree or, in other words, the .java file location in a filesystem. When the class is compiled and its .class file with bytecode is generated, the package name also reflects the .class file location in the filesystem.