Convert array list items to integer
<p>I have an arraylist, say  arr. Now this arraylist stores numbers as strings. now i want to convert this arraylist to integer type. So how can i do that???</p>

<pre><code>ArrayList arr = new ArrayList();

String a="Mode set - In Service", b="Mode set - Out of Service";

if(line.contains(a) || line.contains(b)) {
    StringTokenizer st = new StringTokenizer(line, ":Mode set - Out of Service In Service");
    while(st.hasMoreTokens()) {
      arr.add(st.nextToken());  
    }
}
</code></pre>
