Here you can find the source of formatOneDp(double inNumber)
Parameter | Description |
---|---|
inNumber | number to format |
public static String formatOneDp(double inNumber)
//package com.java2s; //License from project: Open Source License import java.text.NumberFormat; public class Main { /** Number formatter for one decimal place */ private static final NumberFormat FORMAT_ONE_DP = NumberFormat.getNumberInstance(); /**//w ww . j a va 2 s.com * @param inNumber number to format * @return formatted number to one decimal place */ public static String formatOneDp(double inNumber) { return FORMAT_ONE_DP.format(inNumber); } }