Back To Java Wrapper Classes Index
//program to convert String to float public class stringtofloat { public static void main(String[] args) { String a=new String("123.45"); float b; b=Float.parseFloat(a); System.out.println("float converted from String is " + b); } }