This document discusses exception handling in Java code. It provides 3 code examples and asks what the output would be for each. The first example asks what would be output with different integer values passed to a method. The second asks what specific RuntimeException would be thrown by pieces of code. The third asks what would be displayed when running a full program that contains try/catch blocks and exceptions.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
53 views2 pages
Exercise Exception Handling
This document discusses exception handling in Java code. It provides 3 code examples and asks what the output would be for each. The first example asks what would be output with different integer values passed to a method. The second asks what specific RuntimeException would be thrown by pieces of code. The third asks what would be displayed when running a full program that contains try/catch blocks and exceptions.