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
Why are arrays useful in java?
Is sizeof a keyword in java programming?
What's the default access specifier for variables and methods of a class?
How hashmap increases its size in java?
What is the difference between jvm and jre? What is an interface?
How do you know if a value is nan?
What is the difference between the ">>" and " >>>" operators in java?
What is variable and its types?
What is the purpose of assert keyword used in jdk1.4.x?
What is an abstract method in java programming?
Differentiate between nested and inner class in java.
Difference between character constant and string constant in java ?
What is JFC?
What is a constructor, constructor overloading in java?
What is the maximum size of list in java?