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

Is sizeof a preprocessor?

0 Answers  


How do you load an HTML page from an Applet ?

2 Answers  


what is the diff between Servletcontext and servletconfig?

5 Answers  


what is the difference between a threads start() and run() methods? : Java thread

0 Answers  


What is return data type?

0 Answers  


How do singleton patterns work?

0 Answers  


How do you sing an Applet ?

0 Answers  


How many types of packages are there in Java?

5 Answers  


What is final keyword in java? Give an example.

0 Answers  


What are the types of strings?

0 Answers  


Question 6 [9] 6.1 In what situations (in general) would you use a TreeMap? (3) 6.2 In what situations (in general) would you use a HashSet to store a collection of values?

1 Answers  


What if static is removed from main method?

0 Answers  


Categories