public static float parseFloat(String str, float defaultValue) {
        try {
            float f = Float.parseFloat(str);
            return f;
        } catch (Exception e) {
        }
        return defaultValue;
    }