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



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

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

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

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

Post New Answer

More Core Java Interview Questions

Can we declare an interface as final?

0 Answers  


What is method and methodology?

0 Answers  


When should a function throw an exception?

0 Answers   Thomson Reuters, Virtusa,


What is oop principle in java?

0 Answers  


What is meant by javabeans?

0 Answers  






Can you sort a list in java?

0 Answers  


What is the basic difference between string and stringbuffer object?

0 Answers  


What are the basic control structures?

0 Answers  


What is a function easy definition?

0 Answers  


What are init(), start() methods and whey they are called?

2 Answers  


What is jee6?

0 Answers  


what is the main class of all the classes

5 Answers   Photon,


Categories