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 really hapens when a object is created using new operator? 1.is it allocates memory to all variables and methods in the class with reference to that object?
what is interface in java? Explain
What does compareto () do in java?
what is for datainputstream?
What is this keyword in java?
What are virtual functions?
Explain about the dynamic behavior of core java?
Why arraylist is not synchronized in java example?
What is the use of pattern in java?
What does the three dot emoji mean?
What is the smallest package in Java API?
which is advanced deep technology in java launched by the sun microsystem??? The answer is very logical If u need correct answer mail me at priya_gupta@gmail.com