The exercise reads as follows:
I cannot get my computer to throw an exception with either integer or float when dividing by 0. Is it possible that when the exercise was written, the pre-intel machines acted differently? NO laughing please! Perhaps I have misunderstood the intention of the question, but I thought it was to replace the if/else statements when checking for zero.
Modify the Calculator class you developed in the exercise from Chapter 4 so that division is done in an @try block. If the division throws an exception, log an error message and continue program execution.
I cannot get my computer to throw an exception with either integer or float when dividing by 0. Is it possible that when the exercise was written, the pre-intel machines acted differently? NO laughing please! Perhaps I have misunderstood the intention of the question, but I thought it was to replace the if/else statements when checking for zero.