Selasa, 22 Desember 2009

java 2

public class ThreadBaru implements Runnable {
public ThreadBaru(){
Thread newThread = new Thread(this);
newThread.start();
}
public void run(){
for (int i=0; i<5; i++){
System.out.println("Dalam childThread("+i+")");
try{
Thread.sleep(100);
}catch(InterruptedException e){}
}
}
}

Tidak ada komentar:

Posting Komentar

silahkan tinggalkan pesan