package z;
public class first implements Runnable {
public first(int t) {
this.t = t;
}
int t;
public static void main(String[] args) {
int num[] = {8, 4, 7, 6, 5, 1};
for (int i : num) {
Thread thread = new Thread(new first(i));
thread.start();
}
}
@Override
public void run() {
try {
Thread.sleep(t * 1000);
System.out.println(t);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}