Java Fraction Format formatDoubleDecimal(float in)

Here you can find the source of formatDoubleDecimal(float in)

Description

format Double Decimal

License

Apache License

Declaration

public static String formatDoubleDecimal(float in) 

Method Source Code

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

import java.text.DecimalFormat;

public class Main {
    public static String formatDoubleDecimal(float in) {
        DecimalFormat df = new DecimalFormat();
        df.applyPattern("0.00");
        return df.format(in);
    }/*w w  w . j  a  v  a  2  s  .  c o m*/
}

Related

  1. formatDouble(Object value)
  2. formatDoubleAmount(double amount)
  3. formatDoubleArray(double[] arr, String format)
  4. formatDoubleAsPointsString(Double d)
  5. formatDoubleAsString(Double val)
  6. formatDoubleDecPoint2(Double value)
  7. formatDoubleList(List list)
  8. formatDoubleString(double data, String pattern)
  9. formatDoubleValue(String originalVal, Double valToProcess)