集合转数组

akdfajf

 //集合转数组
//                StringBuffer sql = new StringBuffer();
//                String[] arr = new String[hjPztTalentInfos.size()];
//                for (int i = 0; i < hjPztTalentInfos.size(); i++) {
//                    arr[i] = hjPztTalentInfos.get(i).getTalentId();
//                }
//                StringBuffer idsStr = new StringBuffer();
//                for (int i = 0; i < arr.length; i++) {
//                    if (i > 0) {
//                        idsStr.append(",");
//                    }
//                    idsStr.append("'").append(arr[i]).append("'");
//                }
原文地址:https://www.cnblogs.com/xuerong/p/5654039.html