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

what really hapens when a object is created using new operator? 1.is it allocates memory to all variables and methods in the class with reference to that object?

3 Answers  


what is interface in java? Explain

0 Answers  


What does compareto () do in java?

0 Answers  


what is for datainputstream?

1 Answers  


What is this keyword in java?

0 Answers  






What are virtual functions?

2 Answers  


Explain about the dynamic behavior of core java?

0 Answers  


Why arraylist is not synchronized in java example?

0 Answers  


What is the use of pattern in java?

0 Answers  


What does the three dot emoji mean?

0 Answers  


What is the smallest package in Java API?

5 Answers   iGate,


which is advanced deep technology in java launched by the sun microsystem??? The answer is very logical If u need correct answer mail me at priya_gupta@gmail.com

0 Answers   IBM,


Categories