Convert from String to float
public class Main { public static void main(String[] args) throws Exception { Float f = Float.valueOf("0.2").floatValue(); } }