public static String format(double value) {
DecimalFormat decimalFormat = new DecimalFormat("#,###", new DecimalFormatSymbols(new Locale("pt", "BR")));
return decimalFormat.format(value);
}
public static String getFormat(double value) {
String[] simbols = new String[] { "", "K", "M", "B", "T", "Q", "QI", "S", "SEP", "OC", "N", "DEC", "UN", "DUO",
"TRE" };
int index;
for (index = 0; value / 1000.0 >= 1.0; value /= 1000.0, ++index) {
}
return VariaveisAPI.format(value) + simbols[index];
}