Double class Constructor
Double(double value)
- Creates a Double object that represents the primitive double argument.
Double(String s)
- Creates a Double object that represents the double value represented by the string.
public class Main {
public static void main(String[] args) {
System.out.println(new Double(1.1));
System.out.println(new Double("1.2"));
}
}
The output:
1.1
1.2
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