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
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 |
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 |
What is meant by Java ?
Where are the card layouts used?
What is unicode datatype?
What is split return?
When should I use singleton pattern?
What is overloading and overriding in java?
What is the use of isempty in java?
What are java packages? What is the significance of packages?
What does %d do in java?
what are the high-level thread states? : Java thread
What is the purpose of default constructor?
What are operators and its types?