public class TTest1 {
    public static void main(String argv[]) {
        for (int i=0; i<2; i++)
            new TTest2();
    } //main()
} //class TTest1

class TTest2 extends Thread {
    public TTest2() {
        start();
    } //constructor

    public void run() {
        while(true) {
            try {
                System.out.println("Hello from thread "+Thread.currentThread().getName() );
                Thread.sleep(1000);
            } catch (InterruptedException ie) {}
        } //while
    } //run()
} //class TTest2