Java String convert double type to String

Description

Java String convert double type to String

public class Main {
  public static void main(String[] args) {
    double number = -12345.25;
    String numberAsString = String.valueOf(number);

    System.out.println(numberAsString);

  }//  w ww.  j a v  a 2  s .  c o  m
}



PreviousNext

Related