Given two integer numbers and we have to divide them by checking exception if divisor is 0.
Example:
Input:
Enter first number : 70
Enter second number : 5
Output:
Result:14
Explanation: There is no exception because divisor is not 0
Input:
Enter first number : 100
Enter second number : 0
Output:
Error:/ by zero
Explanation: Error:java.lang.ArithmeticException: / by zero
Java program:
Output
need an explanation for this answer? contact us directly to get an explanation for this answer