Sep 05

Use static method Double.toString()

double d = 123.456;
String s = java.lang.Double.toString(d);

// An alternative would be to
// use the following string concatenation

String s2 = "" + d;

written by objects \\ tags: , ,


Leave a Reply

You must be logged in to post a comment.