Why Wait and notify are kept in Object class although they
are used only with Thread Class

Answer Posted / srinivas

Since the locking mechanism happens at the Object level so
they are in Object Class.

Is This Answer Correct ?    21 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between synchronized and synchronized block?

760


Why is a string immutable?

740


Is null a string or object in java?

719


What is final keyword in java? Give an example.

755


What is meant by memory leak?

711


What is getclass () getname () in java?

872


Explain what is encapsulation?

802


What are thread safe functions?

705


Which number is denoted by leading 0x or 0x in java?

812


Is string an object?

853


What is the output of the below java program?

797


How to change value in arraylist java?

719


What do you mean by stack?

860


What is string pool in java?

754


What is member in java?

680