Convert java double to Double object - Java Language Basics

Java examples for Language Basics:double

Description

Convert java double to Double object

Demo Code


public class Main {
  public static void main(String[] args) {
    double d = 10.56;
    Double dObj = new Double(d);
    System.out.println(dObj);/*  w  w w. j a v a 2s . co  m*/
 
  }
}

Result


Related Tutorials