title: Problems using DecimalFormat
body: <p>I am having problems using <code>DecimalFormat</code> when I am going to print out coefficients after a regression.</p>
  
  <p>Here is the part of the code that is facing problems;  </p>
  
  <pre><code>DecimalFormat twoDForm = new DecimalFormat("0.00");   
  private double s(double d){  
      return Double.valueOf(twoDForm.format(d));  
  }  
  </code></pre>
  
  <p>and here is the error message in eclipse;</p>
  
  <pre><code>Exception in thread "main" java.lang.NumberFormatException: For input string: "0,16"  
   at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)  
   at java.lang.Double.valueOf(Unknown Source)  
   at model.ARF2.s(ARF2.java:126)  
   at model.ARF2.printBestModel(ARF2.java:114)  
   at testing.testclass3.bestForecastingModel(testclass3.java:69)  
   at testing.testclass3.main(testclass3.java:36)  
  </code></pre>
  
  <p>Please let me know if anyone has any surgestions on how to fix the code. I want two decimals on my coefficients. </p>
  
  <p>Thank you</p>
  
  <p>Lars</p>