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 are class types in java?

567


Explain about fail safe iterators in java?

556


What is the impact of declaring a method as final?

552


What is java string pool?

532


Is sizeof a preprocessor?

534






Can we define private and protected modifiers for the members in interfaces?

527


When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?

750


What is an argument in java?

498


What must a class do to implement an interface in java programming?

527


Is break statement can be used as labels in java?

495


What is the exception hierarchy in java?

476


When do you get classcastexception?

541


What do you understand by looping in java? Explain the different types of loops.

553


Difference between string, string builder, and string buffer?

520


How can I become a good programmer?

480