14 lines
357 B
Java
14 lines
357 B
Java
|
//: concurrency/ExceptionThread.java
|
||
|
// {ThrowsException}
|
||
|
import java.util.concurrent.*;
|
||
|
|
||
|
public class ExceptionThread implements Runnable {
|
||
|
public void run() {
|
||
|
throw new RuntimeException();
|
||
|
}
|
||
|
public static void main(String[] args) {
|
||
|
ExecutorService exec = Executors.newCachedThreadPool();
|
||
|
exec.execute(new ExceptionThread());
|
||
|
}
|
||
|
} ///:~
|