结果集排序/List遍历

List<String> resultList = new ArrayList<String>(); resultList.add(str1); ...... resultList.add(strn); Collections.sort(resultList); FileOutputStream outStream = new FileOutputStream(efsCRCResultFile); Iterator itr = resultList.iterator(); while (itr.hasNext()) { outStream.write(((String)itr.next()).getBytes()); }

你可能感兴趣的:(String,iterator)