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.*; ?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / hardyesh gupta
java.awt.*; imports the classes available in awt package,but
it does not import packages available in awt.To import the
event package available in awt package, we use the
java.awt.event.*;
| Is This Answer Correct ? | 6 Yes | 0 No |
Accenture NJ mostly ask question on Collection like 1)How to sort Objcts and how treeset sort them 2)Explain mechanism of Hashcode finding in Java 3)Name some of the Sorted collection.
How do you initialize an arraylist in java?
Write the algorithm to check the number non-leaf nodes in a tree.
Why non nested classes in java are not having marked as protected access specifier
What is the difference between pass by reference and pass by pointer?
How do you differentiate abstract class from interface?
What are Transient and Volatile Modifiers?
3 Answers SAP Labs, TUP Manila,
What is lambda in java?
What is an association?
What is default constructors?
Explain pass by reference and pass by value?
Are arrays passed by reference in java?