title: Convert a String to float in java
body: <p>I'm trying to parse a String to a float with the <code>float.parsefloat()</code> method but it gives me an error concerning the format.</p>
  
  <pre><code>int v_CurrentPosX = Math.round(Float.parseFloat(v_posString)); //where v_posString is the float that I want to convert in this case 5,828
  </code></pre>
  
  <p>And the error:</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.NumberFormatException: For input
    string: "5,828"   at
    sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
      at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)</p>
  </blockquote>