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 predefined function in java?
What is the difference between a choice and a list?
can you use the two main method in same class?how?
4 Answers DELL, Geosoft, SparkTG,
What is listnode in java?
what is aggregation in java?
Why is java called java?
how to compile jsp?
What is a 16 bit word?
Why is singleton instance static?
How do you stop a thread in java?
How many threads can I run java?
explain the concept of virtual method invocation in polymorphism in detail?