Get the hexadecimal string representation
static String toHexString(double d)
- Returns a hexadecimal string representation of the double argument.
public class Main {
public static void main(String[] args) {
System.out.println(Double.toHexString(1.2));
}
}
The output:
0x1.3333333333333p0
Home
Java Book
Essential Classes
Java Book
Essential Classes
Double:
- Double class
- Constants in Double class
- Double class Constructor
- Return double value as byte, double, float, int, long, short
- Compare two double values
- Is a double value an infinite large value, or it is not a number.
- Convert string value to double
- Convert double value from string
- Get the hexadecimal string representation
- Bit oriented calculation for double type