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

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

Question

Given the code fragment:

public static void main(string[] args) (
= new Arraybist ();

ArrayList myList =
string[] myArray;
try (
while (true) {
nyList.add ("My string"):
d
)

catch (RuntimeException re) |
System. out. println ("Caught a RuntimeException");

?
catch (Bxception ¢) ¢
system, out. printin

Caught an Exception");

)
System. out.print1n ("Ready to use");

What is the result?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

C.