Hello everybody ,
I was messing around with java and when I tried to divide a double(decimal) number by 0 ; it was giving me a Infinity response ; does anyone know how to override that infinity response so it can output something like " Why did u just divide by 0 Try Again " . I think it has something to do with the arithmetic expression like so .
but It is not outputing that message someone has a solution ?catch(ArithmeticException e) { System.out.println(beep) return " Why did u just divide by 0 Try Again "; }
Also I don't really know it is more of a question or a "what's wrong with my code " so let me know if i am in the wrong section
Thanks