concurrencypuzzlers/src/chapter1/sleepers/Sleeper1.java
2019-09-20 15:36:54 +02:00

13 lines
272 B
Java

package chapter1.sleepers;
public class Sleeper1 {
// NB they are milliseconds
public static void main(String[] args) throws InterruptedException {
System.out.println("sleep");
Thread.sleep(1000);
System.out.println("wake up");
}
}