And Equal Constants wen equated Shud Equate 2 True
The behavior of Double.NaN is defined by the Java Language Specification: All numeric operations with NaN as an operand produce NaN as a result. As has already been described, NaN is unordered, so a numeric comparison operation involving one or two NaNs returns false and any != comparison involving NaN returns true, including x!=x when x is NaN.
Please make the extra effort to write out words such as "when", "should", and "to". The extra keystrokes won't cost much in the way of time, and the enhanced clarity will be appreciated by those communicating on a forum with international readership.
Therefore, you should ask "Why is the output 'False True'?", rather than "What is the output?". You can easily find out the output yourself, and that's not really the source of your confusion. The issue at hand is *why* the output is the way it is, and unrelated questions just get in the way...
But What's The Reason For equals() which Return True
Good question, easily answered by looking at the API:
If d1 and d2 both represent Double.NaN, then the equals method returns true, even though Double.NaN==Double.NaN has the value false.
It's an extremely important skill to learn to read the API and become familiar with the tools you will use to program Java. Java has an extensive set of documentation that you can even download for your convenience. These "javadocs" are indexed and categorized so you can quickly look up any class or method. Take the time to consult this resource whenever you have a question - you'll find they typically contain very detailed descriptions and possibly some code examples.