A DESCRIPTION OF THE PROBLEM :
The major Problem is, that "double" and "float" knows infinity and act in every time. So the handling does not recognize the concept in Math of a division by zero. This is not expected for developer and an expected Exception isn't thrown. -Infinity and Infinity means counts over an casting limitation of possible numbers. But a division by zero is not infinite and means an infinity stepcount of calculations.
//hidden for the compiler
System.out.println(Float.valueOf("100") / Float.valueOf("0") * 1);
//Several IDE's yells , but returns infinity
System.out.println((float) 100 / (float) 0 * 10);
System.out.println((double) 100 / (double) 0 * 10);
//drop an java.lang.ArithmeticException: / by zero
System.out.println((int) 100 / (int) 0 * 10);
The major Problem is, that "double" and "float" knows infinity and act in every time. So the handling does not recognize the concept in Math of a division by zero. This is not expected for developer and an expected Exception isn't thrown. -Infinity and Infinity means counts over an casting limitation of possible numbers. But a division by zero is not infinite and means an infinity stepcount of calculations.
//hidden for the compiler
System.out.println(Float.valueOf("100") / Float.valueOf("0") * 1);
//Several IDE's yells , but returns infinity
System.out.println((float) 100 / (float) 0 * 10);
System.out.println((double) 100 / (double) 0 * 10);
//drop an java.lang.ArithmeticException: / by zero
System.out.println((int) 100 / (int) 0 * 10);