How to convert Float to String in Java
Example of converting Float to String in Java

/*
* Convert Float to String example. Program to convert Java
* Float object to String object.
*/

public class FloatToString {

public static void main(String args[]){

//new Float object
Float fObj = new Float("1.123");

//to convert Float to String use toString method of Float wrapper class
String strFValue = fObj.toString();

System.out.println("Float converted to String: " + strFValue);

}
}
Ads by Google


Output
Float converted to String: 1.123
String Examples