Java Fraction Format formatFloat(String format, double f)

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

Description

format Float

License

Apache License

Declaration

public static String formatFloat(String format, double f) 

Method Source Code

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

public class Main {

    public static String formatFloat(String format, double f) {
        StringBuffer formatString = new StringBuffer(format);
        java.text.DecimalFormat df = new java.text.DecimalFormat(formatString.toString());
        return df.format(f);
    }//from w  w  w . j a v  a2 s  . co m
}

Related

  1. formatFloat(float num)
  2. formatFloat(float number)
  3. formatFloat(float number, int numberOfAfterDot)
  4. formatFloat(Float someFloat)
  5. FormatFloat(float value, int point)
  6. formatFloatToStr(Float str)
  7. FormatFolat(Float num)
  8. formatGetal(float getal)
  9. formatIndexValuePairs(List indicies, List values, String valueSeparator, String rangeSeparator)