Here you can find the source of toInt(String arr, String separator)
public static int[] toInt(String arr, String separator)
//package com.java2s; //License from project: LGPL public class Main { public static int[] toInt(String arr, String separator) { if (arr == null || "".equals(arr)) { return new int[0]; }/* w ww. jav a2 s.co m*/ String[] array = arr.split(separator); int[] r = new int[array.length]; for (int i = 0; i < array.length; i++) { r[i] = Integer.parseInt(array[i]); } return r; } }