72创建线程的方式 import java applet. *i public class thread extends applet i mythread tl=new mythreado public inito i tIstart; class mythread extends Thread i public void runo f for (int i=0; K<4; i++) System. out printIn(2+i i trytsleep(400) 3 catch(Interupted Exception er9 import java.applet.*; public class thread extends Applet { mythread t1=new mythread(); public init() { t1.start();} class mythread extends Thread { public void run() { for (int i=0;i<4;i++) System.out.println( “”+i); { try{sleep(400); } catch(InteruptedException e){ } } } 7.2 创建线程的方式