1,String轉List
//常見的為逗號分隔
String str = "a,b,c";
List<String> list1 = Arrays.asList(str.split(",")); //[a, b, c]
List<String> list2 = Arrays.asList(str.split("")); //[a, ,, b, ,, c]
2,List轉String
List<String> list = new ArrayList<String>();
list.add("a");
list.add("b");
list.add("c");
String str1 = StringUtils.join(list, ","); //a,b,c
String str2 = StringUtils.join(list, ""); //abc
