Thread class methods

1. To know the currently running thread.

       Thread t = Thread.currentThread();

2. To start a thread


3. To stop the execution of a thread for a specified time.


4. To get name of a thread

    String name = t.getName();

5. To set a new name to a thread.


6. To get the priority of a thread

   int priorityno = t.getPriority();

7. To set the priority of a thread

    t.setpriority(int priorityno);

8. To test if a thread is still alive

   t.isAlive(); return true/false;

9. To send notification to a waiting thread


10. To send notification to all waiting threads


11. To wait till the object is released