private String formatNumber(double a)
    {
        NumberFormat setFormat = NumberFormat.getInstance();
        setFormat.setMaximumFractionDigits(2); // set the fraction 
        return setFormat.format(a);
    }