Rules to remember when defining a package statement:
- There can be EXACTLY ONE package statement in a java source code file.
- Package and sub-package names should always be in lowercase (according to Java naming conventions). Their names should follow the rules defined for valid java identifiers.
- The package and sub-package names are separated using a dot.
- For packaged java types (classes, interfaces, enumerations and annotations) the package statement is the first statement in a java code source file. The ONLY exception is that comments can appear before or after a package statement.
And remember: All the classes and interfaces defined in a java source code file are defined in the same package. (i.e, under no circumstances the classes, interfaces, enumerations and annotations defines in the same Java source code file can be part of a different packages.