Check out example codes for "convert string to float java". It will help you in understanding the concepts better.

Code Example 1

String yourString = "23.7";
float yourFloat = Float.parseFloat(yourString);

Code Example 2

String output = Float.parseFloat(floatNum); /** convert float to string using objName.parse(ObjName) <--capitalized usually. */

Learn ReactJs, React Native from akashmittal.com