Create thread in java

Create thread in java

COMPLETE SOURCE CODE FOR CreateThread.java


public class CreateThread implements Runnable
{
//all thread implementation will be put in run method
public void run()
{
//Print hi
System.out.println("HI");
}

public static void main(String[]args)
{
//Create thread by create CreateThread object
CreateThread a=new CreateThread();

//run the thread
a.run();
}
}


JUST COMPILE AND EXECUTE IT

RELAXING NATURE VIDEO