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 / 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 |
Post New Answer View All Answers
Does java trim remove newline?
Which are different kinds of source code?
What is advantage of java?
Can we declare a class as static?
How the metacharacters are different from the ordinary characters?
Where is singleton pattern used?
Outline the major features of java.
What is formatted output?
Can you start a thread twice in Java?
What is the difference between serializable and externalizable interfaces?
What is the relationship between clipping and repainting under awt?
Can inner class be public in java?
What if constructor is protected in java?
Why are global variables used?
What is the symbol for line break?