Here you can find the source of formatPct(final Number amount)
Parameter | Description |
---|---|
amount | specifies the U.S dollar amount to be formatted. |
public static String formatPct(final Number amount)
//package com.java2s; public class Main { /**//from ww w. j ava 2s. c o m * Format the given amount into human readable string. This is the textual * formatting for a percent amount. * * @param amount * specifies the U.S dollar amount to be formatted. * * @return string containing the formatted percent amount. */ public static String formatPct(final Number amount) { // Append '%'. if (amount == null) { return "--"; } else { return amount.doubleValue() + "%"; } } }