File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes wait() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "wait()" Watch "wait()" New topic
Author

wait()

sai donthneni
Ranch Hand

Joined: Mar 26, 2006
Posts: 50
I would like to know whether wait() method belongs to class Thread or it belongs to class object? Since, when wait() is implemented in classes it is just called as wait() and not being called by any object inside a synchronous method.
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
Originally posted by sai donthneni:
I would like to know whether wait() method belongs to class Thread or it belongs to class object? Since, when wait() is implemented in classes it is just called as wait() and not being called by any object inside a synchronous method.


Well the wait() method is public in Object which means it is inherited by every class including Thread.

What's important is the thread that calls the wait() method. Whatever thread calls it will place itself into the waiting state.
[ April 10, 2006: Message edited by: Keith Lynn ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: wait()
 
Similar Threads
Base Class variable
Basic question on wait & notify
wait()
thread question
Static Methods and Instance Methods