Java Fraction Format formatGetal(float getal)

Here you can find the source of formatGetal(float getal)

Description

format Getal

License

Apache License

Declaration

public static String formatGetal(float getal) 

Method Source Code

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

import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;

public class Main {
    public static String formatGetal(float getal) {
        DecimalFormatSymbols dfs = new DecimalFormatSymbols();
        dfs.setGroupingSeparator('.');
        dfs.setDecimalSeparator(',');
        DecimalFormat decimalFormat = new DecimalFormat("0.##");
        decimalFormat.setDecimalFormatSymbols(dfs);
        return decimalFormat.format(getal);
    }// w w  w . j  a  v a  2s. co  m
}

Related

  1. formatFloat(Float someFloat)
  2. FormatFloat(float value, int point)
  3. formatFloat(String format, double f)
  4. formatFloatToStr(Float str)
  5. FormatFolat(Float num)
  6. formatIndexValuePairs(List indicies, List values, String valueSeparator, String rangeSeparator)
  7. formatInt(double value)
  8. formatIntoCurr(double num, int digits)
  9. formatIntRate(double rateInt)