java.lang.ObjectExceptionsHandledWithIf
public class ExceptionsHandledWithIf
Validating that both inputs are integers and the denominator is not zero an using if statements.
| Constructor Summary | |
|---|---|
ExceptionsHandledWithIf()
|
|
| Method Summary | |
|---|---|
static boolean |
isInteger(java.lang.String numberString)
A boolean method that evaluates a 'String' to see if all characters within it are integers. |
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. |
| Methods inherited from class |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExceptionsHandledWithIf()
| Method Detail |
|---|
public static boolean isInteger(java.lang.String numberString)
numberString - The 'String' to be evaluatedpublic static void main(java.lang.String[] args)
args - The String[] array command line parameter
public static int quotient(int numerator,
int denominator)
numerator - The dividend of the division operationdenominator - The divisor of the division operation