Multiple Choice
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 will cause the first exception to occur in the code in the accompanying figure?
A) If the divisor is zero
B) If the dividend is zero
C) If the quotient is zero
D) This code will not compile, so an exception cannot be triggered.
Correct Answer:

Verified
Correct Answer:
Verified
Q9: If an exception occurs in a try
Q10: A checked exception is any exception checked
Q14: Statements that might generate an exception are
Q16: Which of the following statements is true?<br>A)
Q22: The JList GUI component generates events that
Q25: An unchecked exception is any exception that
Q29: int number;<br>Boolean done = false;do<br>{<br>Try<br>{<br>System.out.print("Enter an integer:
Q32: The class RuntimeException is the superclass of
Q38: import java.util.*;<br>Public class ExceptionExample1<br>{<br>Static Scanner console =
Q40: The methods getMessage and printStackTrace are private