Java SE 8 Programmer 1Z0–808 Practice Full Test 1
© examsiri.com
Question : 46 of 84
Marks:
+1,
-0
Given the code:
What is the result?
public static void main(String[] args) {
try {
int num = 10;
int div = 0;
int ans = nim / div;
} catch (ArithmeticExeption ae) {
ans =0 // line n1
}catch (Exception e) {
System.out.println("Invalid calculation");
}
System.out.println("Answer = " + ans); // line n2
} What is the result?
Go to Question: