why the wait,notify,notifyall methods are placed in object
class?these are the thread concepts why these methods are
placed in Object class?

Answers were Sorted based on User's Feedback



why the wait,notify,notifyall methods are placed in object class?these are the thread concepts why ..

Answer / vinayakkatkar

wait notify method can be use din some applications where we
have producer consumer mechanism
so they need not be the methods of thread class
and they must be available to the all classes not extending
the thread class
hence the reason



Hi, I have created a blog named as knowledge is free
where you can download many useful e-books on java ,linux,
php , c ,c++
and also request books to me.
I will make it available to all of you. Please tell your
friends to visit the blog
This is the link to blog
http://vinayakkatkar.blog.co.in


--
vinayak

Is This Answer Correct ?    7 Yes 3 No

why the wait,notify,notifyall methods are placed in object class?these are the thread concepts why ..

Answer / subhareddy

wait ,notify,notifyall are the methods defined in object
class because we call them on object not on threads.so they
are defined in object class.

Is This Answer Correct ?    8 Yes 13 No

Post New Answer

More Core Java Interview Questions

What is a native method?

2 Answers  


What is palindrome in java?

0 Answers  


class A { public void disp(int a,int b) { System.out.println("hai"); } } class B { public void disp(int a,int b,int c) { System.out.println("hai"); } } above program is overloading or overriding?

9 Answers   Infosys, Wipro,


Explain with example the concept of constant variable in java.

0 Answers   HCL,


What is variable length arguments in java?

0 Answers  






What is instanceof keyword?

0 Answers  


What is the frontend and backedn in Java?

3 Answers   TCS,


Can a lock be acquired on a class?

3 Answers  


does core java and j2se both are same?

5 Answers  


diff. b/w JAVA and javascript...

3 Answers   NIIT,


What is integer valueof?

0 Answers  


Give a practical example of singleton class usage?

0 Answers  


Categories