//把List集合转换为字符串用&隔开 StringBuffer stringBuffer = new StringBuffer(); for (int i = 0; i < list.size(); i++) { stringBuffer.append(list.get(i).toString().trim() + "&"); } String s = stringBuffer.substring(0, stringBuffer.length() - 1).toString();
//把String字符串转换为数组用List集合存入
ArrayList<String> list = new ArrayList(); String[] split = symptom.split("&"); for (int i = 0; i < split.length; i++) { list.add(split[i]); }
发表评论