Why doesn't Integer represent NaN in Java?
double, integer, java, nan
Solution
The answer has very little to do with Java. Infinity or undefined numbers are not a part of the integer set, so they are excluded from `Integer`, whereas floating point types represent real numbers as well as complex numbers, so to deal with these, `NaN` has been included with floating point types.
Problem
When I write something like ``` double a = 0.0; double b = 0.0; double c = a/b; ``` The result is `Double.NaN`, but when I try the same for integers, it produces an `ArithmeticException`. So, why isn't there a `Integer.NaN`?