Java Fraction Format FormatFloat(float value, int point)

Here you can find the source of FormatFloat(float value, int point)

Description

Format Float

License

Apache License

Declaration

public static String FormatFloat(float value, int point) 

Method Source Code


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

import java.text.NumberFormat;

public class Main {

    public static String FormatFloat(float value, int point) {
        NumberFormat numFormat = NumberFormat.getNumberInstance();
        numFormat.setMaximumFractionDigits(point);
        String str = numFormat.format(value);
        return str;
    }/*from   www.  ja v a 2 s. co m*/
}

Related

  1. formatFloat(float f, String format)
  2. formatFloat(float num)
  3. formatFloat(float number)
  4. formatFloat(float number, int numberOfAfterDot)
  5. formatFloat(Float someFloat)
  6. formatFloat(String format, double f)
  7. formatFloatToStr(Float str)
  8. FormatFolat(Float num)
  9. formatGetal(float getal)