日期:2014-05-19 浏览次数:20918 次
List<String> list = new ArrayList<String>(); for (String s : acctitleIdArray) { list.add(s); } List<String> existList = new ArrayList<String>(limitSubList).retainAll(list); List<String> notExistList = list.removeAll(limitSubList); StringBuilder existBuf = new StringBuilder(); for (String s : existsList) { existBuf.append(s).append(","); } if (existBuf.length()>0) {existBuf.delete(existBur.length()-1, existBur.length());} StringBuilder notExistBuf = new StringBuilder(); for (String s : notExistList) { notExistBuf.append(s).append(","); } if (notExistBuf.length()>0) {notExistBuf.delete(notExistBuf.length()-1, notExistBuf.length());} String[] result = new String[]{existBuf.toString(), notExistBuf.toString()}; return result;
------解决方案--------------------