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 method throws the second exception in the code in the accompanying figure?
A) nextInt
B) toString
C) println
D) nextLine
Correct Answer:

Verified
Correct Answer:
Verified
Q2: During program execution, if division by zero
Q9: If an exception occurs in a try
Q10: A checked exception is any exception checked
Q16: Which of the following statements is true?<br>A)
Q22: The JList GUI component generates events that
Q23: The class Throwable is derived from the
Q34: import java.util.*;<br>Public class ExceptionExample1<br>{<br>Static Scanner console =
Q40: The methods getMessage and printStackTrace are private
Q40: A message is returned by which method
Q43: import java.util.*;<br>Public class ExceptionExample1<br>{<br>Static Scanner console =