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

Can we use different return types for methods when overridden?

558


Which class contains a method: cloneable or object?

542


What is methodological framework?

579


What is the default value of the local variables?

515


Mention the default values of all the elements of an array defined as an instance variable.

527






Explain list interface?

524


Is java call by reference?

534


What are keywords in programming?

570


Explain the difference between map and flatmap stream operation?

823


What is the significance of continue jump statement? Explain with an example.

745


What are advantages and disadvantages of OOPs?

630


Is it possible to specify multiple jndi names when deploying an ejb?

561


What class allows you to read objects directly from a stream in java programming?

516


What Is Query Throttling in java?

569


What do you mean by checked exceptions?

542