Java Decimal Round roundOffToTwoDecimal(double value)

Here you can find the source of roundOffToTwoDecimal(double value)

Description

round Off To Two Decimal

License

Open Source License

Declaration

public static double roundOffToTwoDecimal(double value) 

Method Source Code

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

import java.text.DecimalFormat;

public class Main {
    public static double roundOffToTwoDecimal(double value) {
        DecimalFormat df = new DecimalFormat("0.00");
        return new Double(df.format(value));
    }/*w ww  .j a v a  2 s. co  m*/
}

Related

  1. roundDouble(double numero, int ceros_a_la_derecha)
  2. roundDouble(Double val, int precision)
  3. roundedNumber(double inVal)
  4. RoundFractionalTons(double d)
  5. roundNumDecimals(double d, int num)
  6. roundThreeDecimals(double d)
  7. roundTwoDecimals(double d)
  8. roundTwoDecimals(double d)
  9. roundTwoDecimals(Double d)