Package java.lang
Class Float

Public Method equals

boolean equals(Object obj)

Overrides:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Compares this object against some other object. The result is true if and only if the argument is not null and is a Float object that represents a float that has the identical bit pattern to the bit pattern of the float represented by this object. For this purpose, two float values are considered to be the same if and only if the method floatToIntBits(float) returns the same int value when applied to each. Note that in most cases, for two instances of class Float, f1 and f2, the value of f1.equals(f2) is true if and only if f1.floatValue() == f2.floatValue() also has the value true.

There are two exceptions:

Example

   Integer data = Integer.decode("20");

The example above decodes a string to an Integer number.