Java Decimal Format decimalFormat(String pattern, double value)

Here you can find the source of decimalFormat(String pattern, double value)

Description

decimal Format

License

Apache License

Declaration

public static String decimalFormat(String pattern, double value) 

Method Source Code

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

import java.text.DecimalFormat;

public class Main {

    public static String decimalFormat(String pattern, double value) {
        return new DecimalFormat(pattern).format(value);
    }/*  w  ww .ja va  2 s . c  om*/

    public static String decimalFormat(String pattern, long value) {
        return new DecimalFormat(pattern).format(value);
    }
}

Related

  1. decimalFormat(double number)
  2. decimalFormat(Double numeric)
  3. decimalFormat(double value, int decimalCnt)
  4. decimalFormat(Object obj)
  5. decimalFormat(String pattern)
  6. decimalFormatLabel(final long value, final long divider, final String unit)
  7. decimalPointTwo(Float input)
  8. decimalString(double d, boolean forceDigits)
  9. encodeDouble(double d)