Question 68 of 76 from exam 1Z0-808: Java SE 8 Programmer I

Question 68 of 76 from exam 1Z0-808: Java SE 8 Programmer I

Question

Given the following code for the classes MyException and Test:

public class MyException extends RuntimeException (}

public class Test {
public static void main(string[] args) {
try (
methodl () +
}
catch (MyException ne) {
system. out. print ("A");
}
3
public static void method1() { // line nl
try (
throw Math. random() > 0.5 2new MyException() :new RuntimeException();
3
catch (RuntimeException re) {
System. out. print ("B");

What is the result?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

B.