class LaunchThread { public static void main (String args[]) { MyThread th; try { th = new MyThread (); th.start (); th.join (0); } catch (Exception e) { System.out.println ("Error occured: " + e); } } } class MyThread extends Thread { public void run () { int i; for (i = 0; i < 300; i++) { System.out.print ("\rThe count is " + i); } System.out.println (""); } }