title: Convert String to Float preserving decimal places
body: <p>I have some Java Strings formatted as Brazilian money with 4 decimal places, like:</p>
  
  <pre><code>1.000.000,0000 (1 million)
  3,9590 (3 dollar and 9590 cents)
  253,8999
  10,0000
  </code></pre>
  
  <p>and so on...</p>
  
  <p>I want to convert it into float so I can do some math with this.</p>
  
  <p>How can I convert Strings to float preserving 4 decimal places? I tried Float.parseFloat() method but I always got NumberFormatException (maybe because of the comma).</p>
  
  <p>Searching on web I only see people who wants to convert Float to formatted String.</p>