Java Fraction Format formateNum(double num)

Here you can find the source of formateNum(double num)

Description

formate Num

License

Apache License

Declaration

public static String formateNum(double num) 

Method Source Code

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

import java.text.NumberFormat;

public class Main {
    public static String formateNum(double num) {
        NumberFormat f = NumberFormat.getInstance();
        f.setMaximumFractionDigits(4);//from  www  .jav  a  2s.com
        return f.format(num);
    }
}

Related

  1. formatDoubleDecimal(float in)
  2. formatDoubleDecPoint2(Double value)
  3. formatDoubleList(List list)
  4. formatDoubleString(double data, String pattern)
  5. formatDoubleValue(String originalVal, Double valToProcess)
  6. formatFloat(double val1, double val2)
  7. formatFloat(float f, String format)
  8. formatFloat(float num)
  9. formatFloat(float number)