public class ExceptionsDemo1
extends java.lang.Object
| Constructor and Description |
|---|
ExceptionsDemo1() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args)
Input two 'int' variables, calculate and display the quotient
of the division operation.
|
static int |
quotient(int numerator,
int denominator)
Performs division with the numerator and denominator parameters
and returns the quotient.
|
public static void main(java.lang.String[] args)
args - The String[] array command line parameterjava.util.InputMismatchException - if numerator or denominator are not integerspublic static int quotient(int numerator,
int denominator)
numerator - The dividend of the division operationdenominator - The divisor of the division operationjava.lang.ArithmeticException - if denominator is zero (0)