Converting a String to a float type Number
public class Main { public static void main(String[] argv) throws Exception { float f = Float.parseFloat("123.4"); System.out.println(f); } }