String s = "360001,光大量化核心,GDLHHX,1,1;360003,光大保德信货币,GDBDXHB,2,1;360008,光大增利收益A,GDZLSYA,1,1;360009,光大增利收益C,GDZLSYC,1,1";
String[] str = s.split(";");
for (int i = 0; i < str.length; i++) {
String ss = str[i];
System.out.println(ss);
}
System.out.println("-------------------------------------------------");
String[] abc = new String[] { "张三", "李四", "王五" };
List<String> abcList = new ArrayList<String>(Arrays.asList(abc));
abcList.retainAll(abcList);
for (String string : abcList) {
System.out.println(string.toString());
}
System.out.println("-------------------------------------------------");
List<String> lists = Arrays.asList("张三", "李四", "王五");
for (int i = 0; i < lists.size(); i++) {
System.out.println(lists.get(i));
}
System.out.println("-------------------------------------------------");
List<String> list=new ArrayList<String>();
list.add("王五");
list.add("张三");
list.add("李四");
int size = list.size();
String[] array = list.toArray(new String[size]);
for (int i = 0; i < array.length; i++) {
System.out.println(array[i]);
}