Why Wait and notify are kept in Object class although they
are used only with Thread Class
Answer Posted / 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 |
Post New Answer View All Answers
A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.
What are thread priorities and importance of thread priorities in java?
What are the types of web technologies?
what are abstract functions?
How to perform binary search in java?
What is use of inner class in java?
Why string is not thread safe?
How would you format a date in java? I.e. In the ddmmyyy format?
What advantage do java's layout managers provide over traditional windowing systems?
make a method which any number and any type of argument and print sum of that arguments.....
What is singleton class in ruby?
Is boolean a data type in java?
Why are constructors used?
what is aggregation in java?
String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?