Apparent Hierarchies of Packages
java, package
Solution
The article you reference explains the point in the next paragraph. The names of the packages are used to indicate relationships to programmers' eyes but do not have any relationship in the eye of the compiler. As the article explains importing `java.awt.*` will not import any classes in `java.awt.font` they are completely separate packages that do not have any hierarchical relationship in the programming language. To import all the classes in `java.awt.font` you have to import `java.awt.font.*` and that does not import any classes in the parent package `java.awt` or in sibling packages like `java.awt.color`.
So even though there is an apparent hierarchical relationship to the programmer there really isn't any in the language. To access classes in a given package you have to import them from their exact package.
If packages were actually hierarchies then one might imagine that this would be the case. However the hierarchy is only there to organise the code and give hint to programmers that a given set of packages are intended to be used together.
Problem
In this post http://java.sun.com/docs/books/tutorial/java/package/usepkgs.html into the paragraph "Apparent Hierarchies of Packages" is written: "" At first, packages appear to be hierarchical, but they are not. For example, the Java API includes a java.awt package, a java.awt.color package, a java.awt.font package, and many others that begin with java.awt. However, the java.awt.color package, the java.awt.font package, and other java.awt.xxxx packages are not included in the java.awt package. "" but if I unjar rt.jar I discover that java.awt.color and java.awt.font are mapped in a hierarchical way: java/awt/color and java/awt/font so do I understand bad or in that post is there an error? However is it possible to create not hierarchical packages? logical packages names that don't match a phisical packages structure?