Here 'this' means a Object of a Thread/Runnable . Since Demo Class is inherited Runnable Interface Demo class can be considered as a thread. so parsing key word ' this' which refers to the current object , when we call ' t.start()' it execute run() method in a new thread. And of course you can parse new Demo Object as well but create that object with a different constructor because otherwise when we create Demo object it will call constructor in a loop.Here is an Example
public class Demo implements Runnable{
Thread t1,t2;
public Demo(){
//Create Child 1 with First constructor
t1=new Thread(new Demo(true),"Child-1");
System.out.println("Thread Info:"+t1);
t1.start();
//Create Child 2 with Second constructor
t2=new Thread(new Demo(1),"Child-2");
System.out.println("Thread Info:"+t2);
t2.start();
}
public Demo(boolean b){
t1=new Thread();
t2=new Thread();
}
public Demo(int i){
t1=new Thread("Constructor 2"){
@Override
public void run() {
System.out.println("Internal Thread "+Thread.currentThread().getName());
}
};
t1.start();
}
@Override
public void run() {
//Work goes Here/
System.out.println("Thread Works :"+Thread.currentThread().getName());
}
/**/
public static void main(String[] args) {
//Default Constructor
Demo demo=new Demo();
}
}
Here When we call Second constructor , 'Constructor-2' named thread is invoked through 'Child-2' Thread.