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  

Double:
  1. Double class
  2. Constants in Double class
  3. Double class Constructor
  4. Return double value as byte, double, float, int, long, short
  5. Compare two double values
  6. Is a double value an infinite large value, or it is not a number.
  7. Convert string value to double
  8. Convert double value from string
  9. Get the hexadecimal string representation
  10. Bit oriented calculation for double type