Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
- /*
- * Convert Double to String example. Program to convert Java
- * Double object to String object.
- */
- public class DoubleToString {
- public static void main(String args[]){
- //new Double object
- Double dObj = new Double("1.543");
- //to convert Double to String use toString method of Double wrapper class
- String strDValue = dObj.toString();
- System.out.println("Double converted to String: " + strDValue);
- }
- }

Post new comment