Home Tutorials Java StringExamples java.lang.String.valueOf(double dnum)
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

java.lang.String.valueOf(double dnum)

Advertisement
The valueof(double dnum), is the Java String Class method, which creats and holds the double value in String.

The valueof(double dnum), is the Java String Class method, which creats and holds the double value in String. And the "dnum" converts the double value to String. See the example below...

a simple example of valueOf(double dnum) method in Java.

public static void main(String[] args)
{
String Str = String.valueOf(8.16);

// double values.
System.out.println(Str);

  }
  }

the output is:
3.14


Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: February 16, 2005

Ask Questions?    Discuss: java.lang.String.valueOf(double dnum)  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com