class TestSleep{
public static void main(String args[]) throws InterruptedException{
ExClassOne VarText=new ExClassOne();
VarText.start();
}
}
class ExClassOne extends Thread{
public void run(){
try{
System.out.print("Thread"+"");
sleep(2000);
System.out.print("&"+"");
sleep(2000);
System.out.print("Multithreading"+"");
sleep(2000);
}
catch(InterruptedException e){ }
}
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น