Here you can find the source of atof(final String str, final float def)
public static float atof(final String str, final float def)
//package com.java2s; public class Main { public static float atof(final String str, final float def) { try {/*from ww w . ja v a 2s . c o m*/ return Float.parseFloat(str); } catch (final Exception ex) { ex.printStackTrace(); } return def; } }