Android examples for java.lang:array convert
convert String Array to Int Array
public class Main{ public static int[] convertStringArraytoIntArray(String[] sarray) { int intarray[] = null; if (sarray != null) { intarray = new int[sarray.length]; try { for (int i = 0; i < sarray.length; i++) { intarray[i] = Integer.parseInt(sarray[i]); }/*from w ww. j a v a 2 s .c om*/ } catch (NumberFormatException e) { } } return intarray; } }