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(double number) {
        if (number == (int) number)
            return String.valueOf((int) number);
        else/*from w  w  w  . j  a  va  2  s .c  o m*/
            return String.valueOf(number);
    }
}

Related

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