Look at the following program and tell what it will output when run: Public class ExceptionTest {
Question:
Look at the following program and tell what it will output when run:
Public class ExceptionTest
{
Public static void main(String[] args)
{
Int number;
String str;
Try
{
Str = "xyz";
Number = Integer.parseInt(str);
System.out.println("A");
}
Catch(NumberFormatException e)
{
System.out.println("B");
}
Catch(IllegalArgumentException e)
{
System.out.println("C");
}
System.out.println("D");
}
}
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis
Question Posted: