The documentation for java.lang.Double.NaN says that it is
A constant holding a Not-a-Number (NaN) value of type
double. It is equivalent
Java uses IEEE 754 for its floating point numbers and therefore follows their rules.
According to the Wikipedia page on NaN it is defined like this:
A bit-wise example of a IEEE floating-point standard single precision NaN:
x111 1111 1axx xxxx xxxx xxxx xxxx xxxxwherexmeans don't care.
So there are quite a few bit-patterns all of which are NaN values.