ArithmeticException missing with Java?
Just to have your point of view...
I am performing a division so instead of testing the nullity of my denominator, I thought it was smarter (and faster) to catch an ArithmeticException and set the result of the division to zero if it would occur. Unfortunately, there's nothing thrown....
Do you know why?
PS: it's not important while I added a test but I would like to understand.
|