Java Number Format numberFormate(double num)

Here you can find the source of numberFormate(double num)

Description

number Formate

License

Open Source License

Declaration

public static int numberFormate(double num) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.text.DecimalFormat;

public class Main {

    public static int numberFormate(double num) {
        DecimalFormat df = new DecimalFormat("#####0");
        String formatNum = df.format(num);
        return Integer.parseInt(formatNum);
    }/*from ww w .j av a2 s .c  o  m*/
}

Related

  1. numberFormat(int i)
  2. numberFormat(int num)
  3. numberFormat(Number number, String... pattern)
  4. numberFormat(String pattern, BigDecimal number)
  5. numberFormat(String pattern, double value)
  6. numberFormatHelper(String string, double d)
  7. numberFormatter(String pattern, int maxDigits)