Create a java application to print numbers from 100 to 80 using
Runnable Interface with the sleep count of 1000.
public class Main implements Runnable {
public void run() {
System.out.println("Running thread");
}
public static void main(String[] args) {
int count=1000;
Main S = new Main();
Thread m= new Thread(S);
m.start();
for(int i=100;i>=80;i--){
System.out.println(i);
} }
}
Comments
Leave a comment