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 |
Is break statement can be used as labels in java?
What are the properties of thread?
What is meant by nested loop?
What's the access scope of protected access specifier?
How do you remove all elements from an arraylist in java?
How many bits are used to represent unicodde,ASCII,UTF-16 and UTF-8 characters?
how to transactions(Bank transactions) in business process in ejb?
What is meant by flickering?
What is string in java?
what difference between throw and throws in exception handling.
How do you add spaces in java?
Can we override static methods?
18 Answers Bally Technologies,