How to convert string array to int array in java
<p>I have an string array in java program like this   </p>

<pre><code>String[] results = { "2", "1", "5", "1" };
</code></pre>

<p>I want to convert this to integer array as like this:  </p>

<pre><code>int[] results = { 2, 1, 5, 1 };
</code></pre>

<p>And finally I want to find the summation of all the <code>int</code> elements of that array.  </p>