Question: import java.io . * ; public class ExceptionExample 1 { static BufferedReader keyboard = new BufferedReader ( new InputStreamReader ( System . in ) )
import java.io;
public class ExceptionExample
static BufferedReader keyboardnew BufferedReadernew InputStreamReaderSystemin;
public static void mainString args
int dividend, divisor, quotient;
try
System.out.printEnter dividend: ;
System.out.flush;
dividend Integer.parseIntkeyboardreadLine;
System.out.println;
System.out.printEnter divisor: ;
System.out.flush;
divisor Integer.parseIntkeyboardreadLine;
System.out.println;
quotientdividenddivisor;
System.out.printlnquotient quotient;
catchArithmeticException aeRef
System.out.printlnException aeRef.toString;
catchNumberFormatException nfeRef
System.out.printlnException nfeRef.toString;
catchIOException ioeRef
System.out.printlnException ioeRef.toString;
Which of the following inputs would be caught by the second catch block in the program above?
A
B
C h
D
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
