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

Is break statement can be used as labels in java?

0 Answers  


What are the properties of thread?

0 Answers  


What is meant by nested loop?

0 Answers  


What's the access scope of protected access specifier?

0 Answers  


How do you remove all elements from an arraylist in java?

0 Answers  


How many bits are used to represent unicodde,ASCII,UTF-16 and UTF-8 characters?

2 Answers  


how to transactions(Bank transactions) in business process in ejb?

1 Answers   Photon,


What is meant by flickering?

0 Answers  


What is string in java?

0 Answers  


what difference between throw and throws in exception handling.

5 Answers  


How do you add spaces in java?

0 Answers  


Can we override static methods?

18 Answers   Bally Technologies,


Categories