start() :
It starts execution of a thread.
run() :
It contains main task to be performed by the thread.
sleep() :
It makes the currently executing thread to pause it's
execution for a specified period of time. When the
thread is going for sleep, it does not release the
locks it holds.
join() :
Using this method, you can make the currently
executing thread to wait for some other threads to
finish their task.
yield() :
It causes the currently executing thread to
temporarily pause its execution and allow other
threads to execute.
wait() :
It makes the currently executing thread to release the
lock of this object and wait until some other thread
notifies it.
notify() :
It wakes up one thread randomly which is waiting for
this object's lock.
notifyAll() :
It wakes up all thread which are waiting for this
object's lock. But, only one thread will acquire lock
of this object depending upon the priority.
isAlive() :
It checks whether a thread is alive or not.
isDaemon() :
It checks whether a thread is daemon thread or user thread.
setDaemon() :
It sets daemon status of a thread.
currentThread() :
It returns a reference to currently executing thread.
interrupt() :
It is used to interrupt a thread.
isInterrupted() :
It checks whether a thread is interrupted or not.
getId() :
It returns ID of a thread.
getState() :
It returns current state of a thread.
getName() and setName() :
Getter and setter for name of a thread.
getPriority() and setPriority() :
Getter and setter for priority of a thread.
getThreadGroup() :
It returns a thread group to which this thread belongs to.