Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


why we import both packages java.awt.*; and java.awt.event.*;
as java.awt.*; can import all classes na. then what is the
need of importing java.awt.event.*; ?

Answers were Sorted based on User's Feedback



why we import both packages java.awt.*; and java.awt.event.*; as java.awt.*; can import all class..

Answer / shiva

writing java.awt.*; can import only the classes inside it but not its sub packages. so we need to write the sub package also.

Is This Answer Correct ?    20 Yes 2 No

why we import both packages java.awt.*; and java.awt.event.*; as java.awt.*; can import all class..

Answer / dhana

As it imports all the classes in java.awt package. It
doesn't import any packages inside java.awt i.e. event package.
So we should declare one more import stat in order to import
all the classes inside event package.

Is This Answer Correct ?    13 Yes 2 No

why we import both packages java.awt.*; and java.awt.event.*; as java.awt.*; can import all class..

Answer / hardyesh gupta

java.awt.*; imports the classes available in awt package,but
it does not import packages available in awt.To import the
event package available in awt package, we use the
java.awt.event.*;

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More Core Java Interview Questions

Why synchronization is important?

0 Answers  


What does localhost mean?

0 Answers  


what is the major difference between linkedlist and arraylist in java?

0 Answers   IBS,


difference between byte stream class and character stream class?

0 Answers  


Can you achieve runtime polymorphism by data members?

0 Answers  


Difference between final and effectively final ? Why is effectively final even required ?

0 Answers  


What is finalize() function in java?

0 Answers  


What is a singleton puppy?

0 Answers  


Can a constructor call the constructor of parent class?

0 Answers  


why java not supproting multiple inheritance?

5 Answers  


What is the difference between state-based unit testing and interaction-based unit testing?

0 Answers  


Difference between Primary key and unique key?

4 Answers  


Categories