title: How can I find the sum of two numbers which are in String variables?
body: <p>In this code fragment, I can't sum <code>a</code> and <code>b</code>:</p>
  
  <pre><code>String a = "10";
  String b = "20"; 
  JOptionPane.showMessageDialog(null,a+b);
  </code></pre>
  
  <p>Since <code>a</code> and <code>b</code> are defined as <code>String</code>, this code will concatenate the strings and output <code>10+20=1020</code>.</p>
  
  <p>How can I get it to instead sum <code>a</code> and <code>b</code> and output <code>10+20=30</code>?</p>