NestedPackages
DRAFT
Observed

NestedPackages
Incorrect

Packages can contain other packages which have access to members of the containing package

Correct

Sub-packages are independent of their parent packages and do not have special access rights

Correction
Here is what's right.

In Java, packages cannot cannot be nested. All packages are top-level packages. Package java.awt and package java.awt.event are both top-level packages. Package java.awt.event is not inside package java.awt.

This may sound strange, especially because package names consist of various pieces (“java”, “awt”, “event”) that seem to represent a path in a tree, and because in the file system, directories that represent packages indeed are nested (e.g., there will be a directory “awt” that contains a file “Component.java” and also contains a subdirectory “event”). Nevertheless, the Java language treats each package as a separate entity that is not related to any other package (e.g., there are no privileged access permissions between the classes in java.awt and the classes in java.awt.event).

Language

Java

Concepts