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?

[370 byte] By [java4life87a] at [2007-10-3 3:30:08]
# 1

> 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.*.

~

yawmarka at 2007-7-14 21:23:59 > top of Java-index,Java Essentials,New To Java...