Here you can find the source of convert2IntegerCollection(String[] strs)
public static Collection convert2IntegerCollection(String[] strs)
//package com.java2s; /**/* w w w . j av a 2 s . c o m*/ * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php */ import java.util.ArrayList; import java.util.Collection; public class Main { public static Collection convert2IntegerCollection(String[] strs) { Collection result = null; if (strs == null) { result = new ArrayList(0); } else { result = new ArrayList(strs.length); for (int i = 0; i < strs.length; i++) { // String s=strs[i]; result.add(new Integer(strs[i])); } } return result; } }