title: DecimalFormat and Double.valueOf()
body: <p>I'm trying to get rid of unnecessary symbols after decimal seperator of my double value. I'm doing it this way:</p>
  
  <pre><code>DecimalFormat format = new DecimalFormat("#.#####");
  value = Double.valueOf(format.format(41251.50000000012343));
  </code></pre>
  
  <p>But when I run this code, it throws:</p>
  
  <pre><code>java.lang.NumberFormatException: For input string: "41251,5"
      at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
      at java.lang.Double.valueOf(Double.java:447)
      at ...
  </code></pre>
  
  <p>As I see, <code>Double.valueOf()</code> works great with strings like <code>"11.1"</code>, but it chokes on strings like <code>"11,1"</code>. How do I work around this? Is there a more elegant way then something like</p>
  
  <pre><code>Double.valueOf(format.format(41251.50000000012343).replaceAll(",", "."));
  </code></pre>
  
  <p>Is there a way to override the default decimal separator value of <code>DecimalFormat</code> class? Any other thoughts?</p>