Question: Problem 2:Take 2 numbers a, b from Console. You have to write a while loop which will take 2 numbers again and again and process

Problem 2:Take 2 numbers a, b from Console. You have to write a while loop which will take 2 numbers again and again and process like below. You have to print a/b. You have to handle division by zero exception and Implement a custom exception named NegativeArgumentException which will get thrown when a or b is a negative number. (Need Java code)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!