1
Given:
public class Test {
public static void main(String[] args) {
try (SomeResource r = new SomeResource()) {
throw new RuntimeException("RuntimeException");
} catch (IOException e) {
System.out.println(e.getMessage());
}
}
}
class SomeResource implements java.io.Closeable {
public void close() throws IOException {
throw new IOException("Close Exception");
}
}
Which exception will be thrown from the main?
Please log in or register to have a possibility to add comment.