As an extremely simple example, all the Java packages and source and binary code on a system might be stored in a single directory and its subdirectories. Each immediate subdirectory of this directory would represent a top-level package, that is, one whose fully qualified name consists of a single simple name. Subpackages of a package would be represented by subdirectories of the directory representing the package.
Each directory corresponding to a package might also contain .java files and .class files. Each of the .java files contains the source for a compilation unit that contains the definition of a class or interface whose binary compiled form is contained in the corresponding .class file.