OnJava8-Examples/concurrency/ExceptionThread.java

16 lines
382 B
Java
Raw Normal View History

2015-09-07 11:44:36 -06:00
// concurrency/ExceptionThread.java
2015-06-15 17:47:35 -07:00
// {ValidateByHand}
// {ThrowsException}
import java.util.concurrent.*;
public class ExceptionThread implements Runnable {
@Override
public void run() {
throw new RuntimeException();
}
public static void main(String[] args) {
ExecutorService exec = Executors.newCachedThreadPool();
exec.execute(new ExceptionThread());
}
2015-09-07 11:44:36 -06:00
}