import java.util.*;public class ExceptionExample1{ static Scanner console = new Scanner(System.in); public static void main(String[] args) { int dividend, divisor, quotient; try { System.out.print("Enter dividend: "); dividend = console.nextInt(); System.out.println(); System.out.print("Enter divisor: "); divisor = console.nextInt(); System.out.println(); quotient = dividend / divisor; System.out.println("quotient = " + quotient); } catch (ArithmeticException aeRef) {
System.out.println("Exception" + aeRef.toString()); } catch (InputMismatchException imeRef) { System.out.println("Exception " + imeRef.toString()); } catch( IOException ioeRef) { System.out.println("Exception " + ioeRef.toString()); } }}Which of the following inputs would be caught by the second catch block in the program in the accompanying figure?
A. 0
B. 10
C. h3
D. -1
Answer: C
You might also like to view...
The first row of a table that contains field names is called a ____.
A. title row B. table title C. header row D. row
Subscribers to a(n) CSS feed can receive periodic updates using a software program called a feed reader or an aggregator.?
Answer the following statement true (T) or false (F)
If a counter namedMyCountin a For loop has the value of 5 on the first pass, 10 on thesecond pass, 15 on the third pass, and so on, the increment would be written as __________.
Fill in the blank(s) with correct word
Which of the following is the CSS property used to set the text color?
a. bgcolor b. background-color c. color d. none of the above