class apple0817 extends Thread{
public void run() {
int i;
for(i = 1; i < 100; i++) {
System.out.println(i);
try {
sleep(500);
} catch (InterruptedException e) {
}
}
}
public static void main(String[] args){
apple0817 th1 = new apple0817();
apple0817 th2 = new apple0817();
th1.start();
th2.start();
}
}
最終更新:2010年09月14日 17:16