GIAC
GSSP-JAVA · Question #100
GSSP-JAVA Question #100: Real Exam Question with Answer & Explanation
Sign in or unlock GSSP-JAVA to reveal the answer and full explanation for question #100. The question stem and answer options stay visible for context.
Question
Wilbert works as a Software Developer for Wintos Inc. He writes the following code. 1. public class tcf 2. { 3. public static void main(String[] args) 4. { 5. try 6. { 7. int x = 5 / 0; 8. System.exit(0); 9. } 10. catch(ArithmeticException e) 11. { 12. System.out.println("Within catch"); 13. } 14. finally 15. { 16. System.out.println("Within finally"); 17. } 18. } 19. } What will happen when he tries to compile and execute the code?
Options
- AIt will compile and print Within catch as the output.
- BIt will compile and execute successfully but will not print anything.
- CIt will compile and print Within catch and Within finally as the output.
- DIt will compile and print Within finally as the output.
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.