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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the primitive type byte?

569


Why javac is not recognized?

514


What are the advantages of user defined functions?

546


Does unicode support all languages?

511


Can we clone singleton object in java?

557






Explain what access modifiers can be used for methods?

563


What is use of map in java?

503


What are recursive functions? Give some examples?

611


How many bytes is 255 characters?

544


What is type parameter in java?

511


How do I know if java is installed?

509


What is math exp in java?

540


What is a heavyweight component?

537


What are the actions that can occur when a thread enters blocked state?

573


Explain about serializable interface in java?

572