title: Java - Calculation Error
body: <p>I have wrote the following code to work out the difference between two floating point numbers to two decimal places:</p>
  
  <pre><code>double p = (Math.round((Double.parseDouble(a) - Double.parseDouble(a))*100))/100;
  </code></pre>
  
  <p><code>a</code> and <code>b</code> are values in a String array that are numbers with decimal places, but obviously in the format of a String. I've tried to convert the String numbers into doubles and carry out the calculation with them but it doesn't seem to be working and throws this error:</p>
  
  <pre><code>Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "N/A"
      at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
      at java.lang.Double.parseDouble(Unknown Source)
  </code></pre>
  
  <p>Additional info: This uses data from the web and seemed to work before, but now it seems to have a bug of sorts. How can I solve this, and what's the problem?</p>