Why Wait and notify are kept in Object class although they
are used only with Thread Class

Answer Posted / chandrasekhar

wait(),notify() are worked on the objects to control the
multiple thereads,not on theread.Hence these methods are
difined object class.

Is This Answer Correct ?    14 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use threads in java?

773


Does java return by reference?

728


Implement a stack with push (), pop() and min() in O(1) time.

792


What is the order of arraylist in java?

799


How does map works in java?

721






Is java based on c?

729


What is generic class?

824


Can You Have Virtual Functions In Java?

827


What are the advantages of inner classes?

705


Is void a wrapper class?

711


Is null a value?

764


I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?

714


Explain thread life cycle in java?

770


What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?

834


How do you join strings in java?

725