Thread class

Thread class provide constructors and methods to create and perform operations on a thread.Thread class extends Object class and implements Runnable interface. Following are few commonly used Constructors of Thread class:

Commonly used methods of Thread class:

The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread. Runnable interface have only one method named run() which means public void run() is used to perform action for a thread. start() method of Thread class is used to start a newly created thread. It performs following tasks: