Java Fraction Format format(Float f)

Here you can find the source of format(Float f)

Description

format

License

Open Source License

Declaration

public static String format(Float f) 

Method Source Code

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

import java.text.DecimalFormat;

public class Main {
    static DecimalFormat df = new DecimalFormat("0.00");

    public static String format(Double d) {
        return df.format(d);
    }//from   w  w w .  ja  v  a 2s  .c  o m

    public static String format(Float f) {
        return df.format(f);
    }
}

Related

  1. format(final double number)
  2. format(final double value)
  3. format(final double value, final int decimalPlaces)
  4. format(final NumberFormat fmt, final double val)
  5. format(float f)
  6. format(float num)
  7. format(float number, int bitCount)
  8. format(float totalNumberOfFreeBytes)
  9. format(float value)