format Query Amount ###,###,##0.00 - Android java.text

Android examples for java.text:DecimalFormat

Description

format Query Amount ###,###,##0.00

Demo Code


//package com.java2s;
import java.text.DecimalFormat;

public class Main {
    public static String formatQueryAmount(String amount) {
        DecimalFormat format = new DecimalFormat("###,###,##0.00");
        return format.format(Double.valueOf(amount));
    }//from   w  ww .j  av  a  2 s  .  c o  m
}

Related Tutorials