Java SE 8 Programmer 1Z0–808 Practice Full Test 1
© examsiri.com
Question : 25 of 84
Marks:
+1,
-0
Given the code fragment:
What is the result?
public static void main(String[] args) {
ArrayList myList = new ArrayList();
String[] myArray;
try {
while (true) {
myList.add("My String");
}
} catch (RuntimeException re) {
System.out.println("Caught a RuntimeException");
} catch (Exception e) {
System.out.println("Caught an Exception");
}
System.out.println("Ready to use");
}What is the result?
Go to Question: