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:

Question Posted: