class aThread extends Thread{
public void run(){
for(int i=0; i<100; i++){
String threadName = Thread.currentThread().getName();
System.out.println(threadName + “: “ + i);
try{
Thread.sleep(1000);
}catch(Exception e){
System.out.println(“Sleep Error”);
}
}
}
}