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 |
Differentiate between a class and an object.
What is a package?
how many access specifiers are available in java
What is basic syntax?
Difference between this() and super() ?
How to prevent a field from serialization ?
Give a brief description of java socket programming?
What does isempty () do in java?
Can I override protected method in java?
How are this and super used?
What is abstract class? Explain
How to create an immutable class?