public class NumberUtils { public static float decimalwithtwo(float f){ return (float)(Math.round(f*100.0f))/100; } }