import java.awt.event.*;
If we import a class such as:
import java.awt.*;
// OR
import java.util.*;
Doesn't that include all of the classes in the package?
If so, then how come we always have to import java.awt.event.* even if we import the whole awt package?
> Doesn't that include all of the classes in the
> package?
Yep.
> If so, then how come we always have to import
> java.awt.event.* even if we import the whole awt
> package?
They're different packages entirely. The perceived hierarchy is only an illusion. java.awt.* and java.awt.event.* are not seen by the compiler as any more related than java.util.* and yawmark.some.other.package.*.
~