Java Number Percentage Format getPercentNumber(double num, int scale)

Here you can find the source of getPercentNumber(double num, int scale)

Description

get Percent Number

License

Apache License

Declaration

public static String getPercentNumber(double num, int scale) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.NumberFormat;

public class Main {

    public static String getPercentNumber(double num, int scale) {
        NumberFormat format = NumberFormat.getPercentInstance();
        format.setMinimumFractionDigits(scale);
        return format.format(num);

    }/*from  w  w  w.  j  av a2 s.c  o  m*/
}

Related

  1. getPercent(long val1, long val2)
  2. getPercentFormatter()
  3. getPercentileWithSuffix(double percentile)
  4. getPercentileWithSuffix(double percentile)
  5. getPercentMemUse()
  6. getPercentString(double numerator, double denominator)
  7. getPercentValue(double value)
  8. getPercentWidth(int iColspan, int iMaxTd)