Java tutorial
//package com.java2s; import java.util.Locale; public class Main { public static String formatAmount(double value) { return String.format(Locale.getDefault(), "%.2f", value); } }