I was just studying OCJP questions and I found this strange code:
public class abc {
public static void main(String[] args) {
System.out.println(0.0%0.0!=0.0/0.0);// it return true
System.out.println(0.0%0.0==0.0/0.0);// it return false
}
}
When I ran the code, I got:
true
false
How is the output false when we're comparing two things that look the same as each other? What does NaN mean?