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 equals method in java?
what is overloading in java?
13 Answers Ascent, DNS, Infosys, SDA, VelTech,
What are the string methods in java?
What happens when main () method is declared as private?
What is the difference between == and === javascript?
What are methods of a class?
Explain the concept of polymorphism with examples?
How big is a 32 bit integer?
Why do we need strings in java?
What is <> used for in java?
Is java still necessary?
Why only one Class is public in one file? Explain in details. Thanks in Advance.