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

1) Find the Merge point of two linked lists. 2) Swap two bits of integer. 3) Reverse individual words of the sentence. 4) Reverse string without using temp string.

2 Answers   HCL,


Why we use multi threading instead of multiprocessing?

0 Answers  


Can we have multiple classes in single file ?

0 Answers  


What does a za z0 9 mean?

0 Answers  


What do the thread?class methods run() and start() do?

0 Answers  






What are some alternatives to inheritance?

0 Answers  


What is the life cycle of an Applet ?

1 Answers  


What is the middleware?

2 Answers  


What is purpose of find feature?

0 Answers  


How Marker Interfaces are instruct to complete the desired need ?

2 Answers  


What classes of exceptions may be caught by a catch clause in java programming?

0 Answers  


What is the difference between jfc & wfc?

0 Answers  


Categories