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 |
Name few java util classes introduced with java 8 ?
Is cout buffered?
When abstract methods are used?
What is an immutable class?
Which package has light weight components?
Can a static class have a constructor?
What is string substring?
How many ways can we create the string object?
When a thread is executing a synchronized method , then is it possible for the same thread to access other synchronized methods of an object ?
What do you understand by Header linked List?
what is use of threads how many ways to create thread
What is a default constraint?