Click here to Skip to main content
15,065,644 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Object class present in java.lang.package.
java.lang.package imported by default in java.
Object class contains Event handling classes and awt.

So why we need to import java.awt when we use awt in java...since it should be in lang.package which is imported by default...

please let me know where i am wrong...

What I have tried:

tried seeing oracle documentation of hierarchy.
Posted
Updated 29-May-21 7:03am

1 solution

Quote:
Object class contains Event handling classes and awt.
No, object is the base of all classes and contains almost nothing. See java.awt Class Hierarchy (Java Platform SE 7 )[^].
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900