String[] 转List<String>

String[] idArr = ids.split(",");
List<String> idList = new ArrayList<String>();
Collections.addAll(idList, idArr);

 List<String>转String[]

List<String> list= new ArrayList<String>();
String[] strings = new String[list.size()];
list.toArray(strings);

 

posted on 2016-01-15 17:43  网络终结者  阅读(984)  评论(0编辑  收藏  举报