public class ThreadSleep extends Thread {
public void run() {
for (int i = 0; i < 5; i++) {
try {
Thread.sleep(1000);
Thread.sleep(1000, 10);
System.out.println("Java Invent");
} catch (InterruptedException e) {
System.out.println(e);
}
}
}
public static void main(String[] args) {
ThreadSleep ts = new ThreadSleep();
ts.start();
}
}