Author
Usage of :- int comapareTo(float f)
Kapil Sachdeva
Greenhorn
Joined: Nov 07, 2000
Posts: 18
posted Feb 22, 2001 04:43:00
0
Can u please tell me the usage of int compareTo(float f) method defined in java.lang.Float . Please give some code lines.
Art Metzer
Ranch Hand
Joined: Oct 31, 2000
Posts: 241
posted Feb 22, 2001 05:56:00
0
To compare primitives, you can use less-than and greater-than signs. To compare the values that the wrapper classes contain, you need to use compareTo(). returns: HTH Art
Manfred Leonhardt
Ranch Hand
Joined: Jan 09, 2001
Posts: 1492
posted Feb 22, 2001 05:58:00
0
Hi, I can give you the example show below. The compareTo method is useful when dealing with extremes. That is POSITIVE_INFINITY, NEGATIVE_INFINITY, NAN, +/-0.0f. Regards, Manfred.
Kapil Sachdeva
Greenhorn
Joined: Nov 07, 2000
Posts: 18
posted Feb 27, 2001 00:38:00
0
Thanks to both of u
subject: Usage of :- int comapareTo(float f)