Convert float value to String value
String toString()
- Returns a string representation of this Float object.
static String toString(float f)
- Returns a string representation of the float argument.
public class Main {
public static void main(String[] args) {
Float floatObject2 = Float.valueOf(1.1F);
System.out.println(floatObject2.toString());
System.out.println(Float.toString(floatObject2));
}
}
The output:
1.1
1.1
Home
Java Book
Essential Classes
Java Book
Essential Classes
Float:
- Float class
- MAX/MIN_VALUE Find out the Maximum value and Minimum value a float type can have
- Create a Float object
- Convert Float to byte, double, float, int, long and short
- Compare two float objects
- Infinite and Not A Number
- Convert float value to Hex String value
- Convert float value to String value
- Convert string value to float value
- Bit oriented calculation for float