Java Fraction Format formatFloat(float f, String format)

Here you can find the source of formatFloat(float f, String format)

Description

format Float

License

Open Source License

Declaration

public static String formatFloat(float f, String format) 

Method Source Code

//package com.java2s;

import java.text.DecimalFormat;

public class Main {

    public static String formatFloat(float f, String format) {
        DecimalFormat df = new DecimalFormat(format);
        return df.format(f);
    }/* w  ww  . jav  a  2 s.c  o  m*/
}

Related

  1. formatDoubleList(List list)
  2. formatDoubleString(double data, String pattern)
  3. formatDoubleValue(String originalVal, Double valToProcess)
  4. formateNum(double num)
  5. formatFloat(double val1, double val2)
  6. formatFloat(float num)
  7. formatFloat(float number)
  8. formatFloat(float number, int numberOfAfterDot)
  9. formatFloat(Float someFloat)