Here you can find the source of floatToInt(String flot)
public static int floatToInt(String flot)
//package com.java2s; //License from project: Open Source License public class Main { public static int floatToInt(String flot) { float m;/* w w w . j ava 2s . c om*/ try { m = Float.parseFloat(flot); } catch (Exception e) { return 0; } return (int) m; } public static int floatToInt(float flot) { return (int) flot; } }