public class testMain {
public static void main(String[] args) {
int[] array = {18, 66, 36, 98, 100, 203, 22};
for (int i : array) {
new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(i);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println(i);
}
}).start();
}
}
}
网友评论