Java Double Number Format format(Double number)

Here you can find the source of format(Double number)

Description

format

License

Open Source License

Declaration

public static String format(Double number) 

Method Source Code

//package com.java2s;

public class Main {

    public static String format(String num) {
        int index = num.indexOf(".");
        num = num.substring(0, index);//  w  ww .j a v  a 2  s. c om
        return num;
    }

    public static String format(Double number) {
        String num = String.valueOf(number);
        int index = num.indexOf(".");
        num = num.substring(0, index);
        return num;
    }
}

Related

  1. format(double b)
  2. format(double d, int decimals)
  3. format(Double decimal)
  4. format(double num, int n)
  5. format(double number)
  6. format(double number, int nums)
  7. format(double number, int precision)
  8. format(double size, String type)
  9. format(double val, int n, int w)