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 =...


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");


 }


 finally


 {


 System.out.println("D");


 }


 System.out.println("E");


 }


}



Dec 14, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here