Examlex

Solved

Import Java.util.*; Public Class ExceptionExample1

question 38

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?


Definitions:

Menopause

Cessation of menstruation and of ability to bear children.

Friendships

Close and enduring relationships characterized by mutual affection, trust, and support.

Middle Age

A period in a person's life typically ranging from about 45 to 65 years old, characterized by physical, psychological, and social changes.

Quality

The standard of something as measured against other things of a similar kind; the degree of excellence of something.

Related Questions