Java Data Type Tutorial - Java Double(double value) Constructor








Syntax

Double(double value) constructor from Double has the following syntax.

public Double(double value)

Example

In the following code shows how to use Double.Double(double value) constructor.

public class Main {
  public static void main(String[] args) {
    System.out.println(new Double(1.1));

  }
}

The output: