Here you can find the source of getIntegerArrayList(String strInput)
public static ArrayList<Integer> getIntegerArrayList(String strInput)
//package com.java2s; import java.util.ArrayList; public class Main { public static ArrayList<Integer> getIntegerArrayList(String strInput) { ArrayList<Integer> ret = new ArrayList<Integer>(); String[] shareIDs = strInput.split(","); if (null != shareIDs && shareIDs.length > 0) { for (int i = 0; i < shareIDs.length; i++) { try { ret.add(Integer.valueOf(shareIDs[i])); } catch (Exception e) { e.printStackTrace(); }/*from w w w.j av a2 s .co m*/ } } return ret; } }