Convert float value to Hex String value
static String toHexString(float f)
- Returns a hexadecimal 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);
System.out.println(Float.toHexString(floatObject2));
}
}
The output:
1.1
0x1.19999ap0
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