Convert double value from string

ReturnMethodSummary
StringtoString()Returns a string representation of this Double object.
static StringtoString(double d)Returns a string representation of the double argument.

public class Main {
  public static void main(String[] args) {
    
    System.out.println(Double.toString(1.2));

  }
}

The output:


1.2
java2s.com  |  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.