nerdexam
GIAC

GSSP-JAVA · Question #128

GSSP-JAVA Question #128: Real Exam Question with Answer & Explanation

Sign in or unlock GSSP-JAVA to reveal the answer and full explanation for question #128. The question stem and answer options stay visible for context.

Question

Rachel works as a Software Developer for Vivanet Inc. She writes the following code using Java. class catchexcp {public static void metha() {int x=4/0;System.out.print("Caught exception");} public static void main(String args[]) {try{metha();}catch(ArithmeticException ae){System.out.print("Caught ArithmeticException");}finally{try{metha();}catch(ArithmeticException ae){System.out.print("ReCaught ArithmeticException");}}}} What will happen when she tries to compile and execute the code?

Options

  • AIt will compile and execute and will display ReCaught ArithmeticException.
  • BIt will not compile.
  • CIt will compile but will throw an exception at runtime.
  • DIt will compile and execute and will display Caught exception Caught ArithmeticException
  • EIt will compile and execute and will display Caught exception ReCaught
  • FIt will compile and execute and will display Caught ArithmeticException ReCaught

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.

Full GSSP-JAVA Practice