import java.*;
Why cannot I do this importing ?? Instead of importing the all class in a particular sub-package of the package \'java\' , I tried t
As you can read in this link on Oracle docs, under the heading Apparent Hierarchies of Packages:
At first, packages appear to be hierarchical, but they are not. For example, the Java API includes a
java.awt
package, ajava.awt.color
package, ajava.awt.font
package, and many others that begin withjava.awt
. However, thejava.awt.color
package, thejava.awt.font
package, and otherjava.awt.xxxx
packages are not included in thejava.awt
package. The prefixjava.awt
(the Java Abstract Window Toolkit) is used for a number of related packages to make the relationship evident, but not to show inclusion.