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
How does finally block differ from finalize() method?
What is array command?
why using interface interface ?
Which is faster string or stringbuilder?
What do you understand by private, protected and public?
What is the difference between an argument and a parameter?
When do we use hashset over treeset?
What does a za z0 9 mean?
What is the private method modifier?
Why does it take so much time to access an applet having swing components the first time?
Explain naming conventions for packages?
can java object be locked down for exclusive use by a given thread? Or what happens when a thread cannot acquire a lock on an object? : Java thread
How many bits is a string in java?
What does the exclamation mark mean in java?
What are the types of inner classes (non-static nested class) used in java?