I've been posed this slightly obscure but interesting question about the behavoir of Java. Any ideas?
Yep, Try this...
public class Main
{
public static void main(String[] args)
{
double a = Double.NaN;
if( a == a ) System.out.println("equal");
}
}
http://www.ideone.com/K0d2j
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With