Join
Blogs
Questions
Videos
Tags
Members
Search
 
 
Create your own blog, earn points and get popular!

Convert Double to String example

  1. /*
  2.  * Convert Double to String example. Program to convert Java
  3.  * Double object to String object.
  4.  */
  5.  
  6. public class DoubleToString {
  7.  
  8.  public static void main(String args[]){
  9.  
  10.   //new Double object
  11.   Double dObj = new Double("1.543");
  12.  
  13.   //to convert Double to String use toString method of Double wrapper class
  14.   String strDValue = dObj.toString();
  15.  
  16.   System.out.println("Double converted to String: " + strDValue);
  17.  
  18.  }
  19.  
  20. }
No votes yet
Share this

Post new comment