Multiple Choice
Analyze the following program. class Test {
Public static void main(String[] args) {
Try {
String s = "5.6";
Integer.parseInt(s) ; // Cause a NumberFormatException
Int i = 0;
Int y = 2 / i;
System.out.println("Welcome to Java") ;
}
Catch (Exception ex) {
System.out.println(ex) ;
}
}
}
A) An exception is raised due to Integer.parseInt(s) ;
B) An exception is raised due to 2 / i;
C) The program has a compilation error.
D) The program compiles and runs without exceptions.
Correct Answer:

Verified
Correct Answer:
Verified
Q15: Design and use interfaces <br>Write a class
Q16: After the following program is finished, how
Q17: Design and create GUI applications <br>Write a
Q18: If a class named Student has no
Q19: How can you get the word "abc"
Q20: If a class named Student has a
Q21: What is displayed on the console when
Q23: Design and implement classes. <br>Design a class
Q24: An attribute that is shared by all
Q25: Write a program that converts US dollars