18 lines
405 B
Java
18 lines
405 B
Java
|
// lowlevel/TestAbort.java
|
||
|
// (c)2017 MindView LLC: see Copyright.txt
|
||
|
// We make no guarantees that this code is fit for any purpose.
|
||
|
// Visit http://OnJava8.com for more book information.
|
||
|
import onjava.*;
|
||
|
|
||
|
public class TestAbort {
|
||
|
public static void main(String[] args) {
|
||
|
new TimedAbort(1);
|
||
|
System.out.println("Napping for 4");
|
||
|
new Nap(4000);
|
||
|
}
|
||
|
}
|
||
|
/* Output:
|
||
|
Napping for 4
|
||
|
TimedAbort 1
|
||
|
*/
|