Java tutorial
//package com.java2s; import java.text.NumberFormat; import java.util.Locale; public class Main { public static String getFormattedValue(double value) { NumberFormat nf = NumberFormat.getCurrencyInstance(new Locale("pt", "BR")); return nf.format(value); } }