Java Double Number Round round(Double num)

Here you can find the source of round(Double num)

Description

round

License

Apache License

Declaration

public static String round(Double num) 

Method Source Code

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

public class Main {

    public static String round(Double num) {
        return String.format("%.2f", num);
    }//from   ww  w  .  ja  va2  s . c  o  m

    public static String round(int num) {
        return num + ".00";
    }
}

Related

  1. round(double dValue)
  2. round(double input)
  3. round(double input, double step)
  4. round(double n)
  5. round(double n, double nd)
  6. round(double num)
  7. round(double num, int bit)
  8. round(double num, int decimal)
  9. round(double num, int numDecs, boolean rawFactor)