Here you can find the source of getOneFractionDigitNumberFormat()
public static NumberFormat getOneFractionDigitNumberFormat()
//package com.java2s; // modify it under the terms of the GNU General Public License import java.text.NumberFormat; public class Main { public static NumberFormat getOneFractionDigitNumberFormat() { NumberFormat result = NumberFormat.getInstance(); result.setMaximumFractionDigits(1); return result; }/*from w ww . j av a2 s . c o m*/ }