The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

needles needed?

Posted by Chin Loong on November 20, 2001 at 5:32 AM

not sure about threads (gotta read up about them for the SCJP :p) but i think probably u can use these methods in Thread to do what u wanted to do ;)


currentThread

public static Thread currentThread()

Returns a reference to the currently executing thread object.
Returns:
the currently executing thread.


getName

public final String getName()

Returns this thread's name.
Returns:
this thread's name.
See Also:
setName(java.lang.String)





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us