I\'m making a simple calculator for this homework, and Java is returning \"Infinity\" when divided by 0.
I need to display some error message, when I get infinity. T
Jacek Kwiecień try this code
double result; try{ result=4.0/0.0; }catch(ArithmeticException e){ System.out.println("Math error "+ e.getMessage()) }
`