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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "what does this mean?" Watch "what does this mean?" New topic
Author

what does this mean?

Calanthe Wei
Ranch Hand

Joined: Oct 27, 2001
Posts: 42
See code bellow:

My question is what doees Test.class.wait(1000) mean? I never see this kind of code before.
Can someone give me some explanation?
Thanks.

ps:
Pl use the [ code ] opening and closing tags (without the spaces) when posting source code.
Thanks.
- satya
[ February 09, 2002: Message edited by: Madhav Lakkapragada ]
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
void wait(long timeout)
Causes current thread to wait until either another thread invokes the notify() method or the notifyAll() method for this object, or a specified amount of time has elapsed.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
Hi Marilyn,
i guess calanthe is asking about that Test.class part of wait()...is it calanthe?
if so then i only know that thats the way u can have static blocks synch etc.
e.g. in a static method say m() we want to have synch block and the class is Test then we 'll do sth like,
static void m() {
synchronized(Test.class) {
// code goes here..
}
}
this is so as we cant use "this" ref in the static methods and so we can write synchronized(this) in the m() method.
Still i need to know what Test.class means here.
regards
maulin
aymen esawey
Ranch Hand

Joined: Jan 29, 2002
Posts: 61
hi
i've asked a Q like that before
here is the thread
http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=24&t=014558
thanks


Aymen Esawey<br />SCJP <img src="smile.gif" border="0"> <br /><a href="http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=32&t=001968" target="_blank" rel="nofollow">how to nuke the SUN </a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what does this mean?
 
Similar Threads
Throwing fewer exceptions
Key events in J2ME
Interview ques
Using AJAX push with ICEfaces (ICEpush)
Applet giving NullPointerException?