Here you can find the source of format(BigInteger amount)
public static String format(BigInteger amount)
//package com.java2s; //License from project: Open Source License import java.math.BigInteger; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.Locale; public class Main { public static String format(int amount) { DecimalFormatSymbols otherSymbols = new DecimalFormatSymbols(Locale.GERMAN); otherSymbols.setDecimalSeparator(','); otherSymbols.setGroupingSeparator('.'); DecimalFormat df = new DecimalFormat("###,###,###,##0", otherSymbols); return df.format(amount); }/*from w ww. j a va 2s. c om*/ public static String format(BigInteger amount) { if (amount == null) { return null; } DecimalFormatSymbols otherSymbols = new DecimalFormatSymbols(Locale.GERMAN); otherSymbols.setDecimalSeparator(','); otherSymbols.setGroupingSeparator('.'); DecimalFormat df = new DecimalFormat("###,###,###,##0", otherSymbols); return df.format(amount); } }