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

Answers were Sorted based on User's Feedback



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

Answer / srinivas

Since the locking mechanism happens at the Object level so
they are in Object Class.

Is This Answer Correct ?    21 Yes 4 No

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

Answer / 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

More Core Java Interview Questions

If I have 1000 objects and my requirement is to sort them quickly, then which collection would you recommend and why?

5 Answers   KPIT,


Can we call virtual funciton in a constructor ?

0 Answers   XX,


Can a class extend 2 classes in java?

0 Answers  


Do you need to import math in java?

0 Answers  


What is regex java?

0 Answers  






What is the default access specifier for variables and methods of a class?

0 Answers  


Difference between a class and an object?

0 Answers  


What is java reflection api?

0 Answers  


What is methodological theory?

0 Answers  


What is meant by javabeans?

0 Answers  


Can I declare a class as private?

0 Answers  


In Inheritence concept, i have a static method in super class and i am inheriting that class to one sub class.in that case the static method is inherited to sub class or not????

12 Answers   Accenture,


Categories