Because f1 and f2 are two different objects. You have to use equals(). But note that using equals() would give false as well, due to IEEE 754 floating-point "single format" bit layout, as it says in Float.equals() there are two exceptions on having the same result on comparing two float objects and two float values:
� If f1 and f2 both represent Float.NaN, then the equals method returns true, even though Float.NaN==Float.NaN has the value false.
� If f1 represents +0.0f while f2 represents -0.0f, or vice versa, the equal test has the value false, even though 0.0f==-0.0f has the value true.
[ November 03, 2007: Message edited by: Joan Horta Tosas ]