Skip to main content

Convert Double object to String object in Java

CODING:
public class JavaDoubleToStringExample {
  public static void main(String[] args) {
    Double dObj = new Double(10.25);
    String str = dObj.toString();
    System.out.println("Double converted to String as " + str);
  }
}

OUTPUT:

Double converted to String as 10.25



Comments