import java.io.*; public class ThreadTest extends Thread { private int i; public static void main(String[] args) { System.out.println ("Hello"); ThreadTest tt = new ThreadTest(); System.out.println ("Goodbye"); } public ThreadTest () { i = 10; start(); i += 2; try { sleep(500); } catch (InterruptedException ie) { System.out.println ("Original catch"); } System.out.println ("From original thread, i: " + i); } public void run () { try { sleep(200); } catch (InterruptedException ie) { System.out.println ("Original catch"); } System.out.println ("From new thread, i: " + i); i++; System.out.println ("Goodbye from thread"); } }