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 |
Mention a package that is used for linked list class in java.
what is inner class in java?
What do you mean Abstraction in java?
What data type is true or false?
What is the symbol for line break?
What is string buffer?
What is string in java? String is a data type?
Are functions objects in java?
Can an interface be final?
What is difference between abstract class & final class
How many types of operators are there?
Are the equals() and hashCode() protected methods of object class?