Convert float value to String value

ReturnMethodSummary
StringtoString()Returns a string representation of this Float object.
static StringtoString(float f)Returns a string representation of the float argument.

public class Main {
  public static void main(String[] args) {
    Float floatObject2 = Float.valueOf(1.1F);
    System.out.println(floatObject2.toString());
    System.out.println(Float.toString(floatObject2));
    
  }
}

The output:


1.1
1.1
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.