Java tutorial
import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; public class Main { public static void main(String[] argv) throws Exception { DecimalFormat format = new DecimalFormat("##.##", DecimalFormatSymbols.getInstance()); System.out.println(format.format(-123456789.12345678)); } }