class Cou extends Thread {
public void run() {
for(int i = 1;i<=100;++i) {
System.out.print(i + " ");
if(i % 10 == 0) System.out.println("Multiple of 10");
try { Thread.sleep(1000); }
catch(InterruptedException e) {}
}
}
public static void main(String [] args) {
new Cou().start();
}
}
No comments:
Post a Comment