Java Decimal Round roundAlloc(Double alloc)

Here you can find the source of roundAlloc(Double alloc)

Description

round Alloc

License

Apache License

Declaration

public static String roundAlloc(Double alloc) 

Method Source Code

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

import java.text.DecimalFormat;

public class Main {
    public static String roundAlloc(Double alloc) {
        return new DecimalFormat("#.#").format(alloc);
    }//from  ww  w .j  a va  2  s. com
}

Related

  1. round(double d, int p)
  2. round(double dValue)
  3. round(double number)
  4. round(double unrounded, int precision)
  5. round(final double value)
  6. roundAndTruncate(double rawValue, int precision)
  7. roundDecimal(double d, int radix)
  8. roundDecimalPlaces(final double input, final int decimalPlaces)
  9. roundDecimals(double d, int numOfDec)