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


Please Help Members By Posting Answers For Below Questions

How many bytes is string in java?

611


What is a generic data type?

574


Define inheritance?

559


Which collections are thread safe in java?

481


Is 0 a real number?

590






What is the Scope of Static Variable?

732


how a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion... ANS:--- >executeupdate method is having boolean return type, if anything goes wrong in data insertion or data updation, it would return false. otherwise, if it successfully inserts data into the database, it would return true NOW HOW TO I CHECK IN MY DURING EXECUTION WHETHER IT RETURNS TRUE OR FALSE... WELL IT WILL DISPLAY ANY MESSAGE OR NOT

1853


What is the use of http-tunneling in rmi?

555


Explain the difference between intermediate and terminal operations in java8?

569


What is meant by memory leak?

542


Define immutable object?

583


How can constructor chaining be done using this keyword?

589


Why stringbuffer is faster than string?

542


What are generic methods?

537


What is the difference between notify and notifyall method?

618