Why can’t we use ‘==’ to compare two float or double numbers [duplicate]
From apidoc, Float.compare: Compares the two specified float values. The sign of the integer value returned is the same as that of the integer that would be returned by the call: new Float(f1).compareTo(new Float(f2)) Float.compareTo: Compares two Float objects numerically. There are two ways in which comparisons performed by this method differ from those performed … Read more