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");
}
System.out.println("D");
}
}



Jun 01, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here