Java Float to String floatToString0(float value)

Here you can find the source of floatToString0(float value)

Description

float To String

License

Open Source License

Declaration

public static String floatToString0(float value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String floatToString0(float value) {
        if (Float.isNaN(value)) {
            value = 0f;//from ww w.ja va  2s .  com
        }
        return String.format("%.2f", value);
    }
}

Related

  1. FloatToString(float value)
  2. floatToString(float value)
  3. floatToString(float value, int precision)
  4. floatToString(float value, String format)
  5. floatToString(float[] values)