Flashcards in Thread Class Methods Deck (10):
Returns reference to the current thread.
Returns the name of the current thread.
Returns the priority value of the current thread.
The current thread invoking this method on another thread waits until the other thread dies. Overloaded to be able to give the timeout in milliseconds or milliseconds and nanoseconds.
Once you start a thread using the start() method, this method will be called when the thread is ready to execute.
Changes the name of the thread to the given name in the argument.
void setName(String name)
Sets the priority of the thread to the given argument value.
void setPriority(int priorityValue)
Makes the current thread sleep for given milliseconds or milliseconds and nanoseconds.
Thread.sleep(long milliseconds, int nanoseconds)
Starts the thread; JVM calls the run() method of the thread.