Here you can find the source of getNumberFraction2Format(final Locale locale)
public static NumberFormat getNumberFraction2Format(final Locale locale)
//package com.java2s; // ProjectForge is dual-licensed. import java.text.NumberFormat; import java.util.Locale; public class Main { public static NumberFormat getNumberFraction2Format(final Locale locale) { final NumberFormat format = NumberFormat.getNumberInstance(locale); format.setMaximumFractionDigits(2); format.setMinimumFractionDigits(2); return format; }/*from w w w .j ava2s . c o m*/ }