Barry Singh Allen wrote:. . . .
Object class contains Event handling classes and awt.
. . . .
No, it doesn't.
There is to all intents and purposes no such thing as a package hierarchy. Even when packages are inside each other, the included packages are not somehow “subordinate” to their enclosing packages. There is a difference in behaviour, but it is so siubtle that I have forgotten what it is. I think you are thinking about inheritance hierarchies. All classes including records, exceptions, and enums are subtypes of Object, That means they inherit Object's eleven non‑private members, which turn out all to be methods.
1: Types in current package: automatically imported.
2: Types in java.lang package: automatically imported if not already imported. That is why it is such a bad idea to create a class with the same name as one you are about to import.
3: Classes in every other package: names not already imported must be explicitly imported or must use the fully qualified name of the type.