
class Extender extends Thread { Extender(Runnable run){ super(run); super.start(); //this.start(); }
public void run(){
System.out.println("Extender Thread is Started :");
//new Thread(new Implementer()).start();
}
} class Implementer implements Runnable { public void run(){ System.out.println("ohhh Implementer Thread is started: "); } } public class ThreadDemo { public static void main(String args[]){ new Extender(new Implementer()).run(); } }
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.