Java Float Number Create toFloat(String s)

Here you can find the source of toFloat(String s)

Description

to Float

License

Open Source License

Declaration

public static Float toFloat(String s) 

Method Source Code

//package com.java2s;

public class Main {

    public static Float toFloat(String s) {
        try {//w ww . j a v  a 2 s.  c o m
            return Float.parseFloat(s);
        } catch (NumberFormatException e) {
            return new Float(0);
        }
    }
}

Related

  1. toFloat(short half)
  2. toFloat(short[] arr)
  3. toFloat(short[] src)
  4. toFloat(String parameter)
  5. toFloat(String property, float f)
  6. toFloat(String s)
  7. toFloat(String s)
  8. toFloat(String str)
  9. toFloat(String str)