renamed folders
This commit is contained in:
14
src/exercises/ex_c/TestingSleep.java
Normal file
14
src/exercises/ex_c/TestingSleep.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package exercises.ex_c;
|
||||
|
||||
public class TestingSleep {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
Thread thread = new Thread(new SleepMessages());
|
||||
thread.start();
|
||||
|
||||
System.out.println("Waiting 3 seconds");
|
||||
Thread.sleep(3000);
|
||||
System.out.println("Stopping thread");
|
||||
thread.interrupt();
|
||||
System.out.println("Stopped");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user