title: How to convert string to int in java to get calculation
body: <p>How to convert string to int to get calculation</p>
  
  <pre><code>String a="2-1";
  </code></pre>
  
  <p>How to convert this string to int to get value as 1</p>