GIAC
GSSP-JAVA · Question #22
GSSP-JAVA Question #22: Real Exam Question with Answer & Explanation
Sign in or unlock GSSP-JAVA to reveal the answer and full explanation for question #22. The question stem and answer options stay visible for context.
Question
Mark works as an Application Developer for XYZ Solutions Inc. He writes the following code. public class TestDemo{public static void main(String[] args){ {try{int x =0;int d= 5/x;}catch(Exception ex){System.out.println("Exception");} catch(ArithmeticException ae){System.out.println("Arithmetic Exception");}}} What is the result when Mark tries to compile and execute the code?
Options
- AException
- BAn exception is thrown at runtime.
- CCompilation fails.
- DArithmetic Exception
Unlock GSSP-JAVA to see the answer
You've previewed enough free GSSP-JAVA questions. Unlock GSSP-JAVA for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.