Question: Java Q1. There are two numbers a and b where a is divided by b. Write a program that takes input from the user for
Q1. There are two numbers a and b where a is divided by b. Write a program that takes input from the user for the two numbers and divide first number by the second number. Here, two types of error that can occur are: What if the user inputs a non-numeric value? Need to handle any exception if it occurs. What if the number is being divided by a zero? Need to handle any exception if it occurs. If there are any exceptions handled, then print information using getMessage0, toString0, and printStackTrace). Also, print the exception object
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
