title: Decimal Format, says it needs to be a string?
body: <p>I'm getting the error "cannot convert from String to Double" when I run this code, any ideas?</p>
  
  <pre><code>    DecimalFormat df = new DecimalFormat("##.###");
  
      String [] data = null;
      data = str.split(" ");
  
      Double bat_avg = Double.parseDouble(data[4])/Double.parseDouble(data[2]);
      bat_avg = df.format(bat_avg);
      System.out.println(bat_avg);
  </code></pre>