Here you can find the source of formatFloat(float money)
public static String formatFloat(float money)
//package com.java2s; import java.text.DecimalFormat; public class Main { public static String formatFloat(float money) { return new DecimalFormat("0.00").format(money); }/* w ww . j a va 2 s . com*/ }