With the help of String.valueOf() and Float.toString() methods, you can convert float to String in Java.
Following is the example that will show conversion from float to String-
public class Example { public static void main(String args[]) { float i = 10.5F; String a = String.valueOf(i); String b = Float.toString(i); System.out.println("a = "+a); System.out.println("b = "+b); } }
Output
a = 10.5 b = 10.5