00:01
Hello students, here is an example of a java program that reads two integers from the users and performs the integer division while handling the potential exceptions.
00:15
So in this program you can see initially you will install all your packages now you will move to the direct try block contains.
00:23
So you can see the try block contains the statements for reading the numerator and the divisor.
00:32
Performing the division and printing the quotient.
00:35
Performing the division and printing the quotient.
00:39
If a zero division exception is thrown, you can see if a zero division exception is thrown, the program catches it in a first catch block and outputs a relevant error message.
00:54
It will, with a relevant error message.
00:57
Similarly, if an input mismatch exception is thrown due to an invalid input, the program catches it in a second catch.
01:10
This is the second catch block and the output as an appropriate error message...