1. ArrayList<String> 转换为 String[]:
ArrayList<String> list = new ArrayList<>();
list.add("aaa");
list.add("bbb");
String[] arrString = (String[])list.toArray() ;
2. String[] 转换为 ArrayList<String>:
ArrayList<String> list = new ArrayList<> (new String[] { "aaa", "bbb" });
3. ArrayList<String> 转换为 String:
ArrayList<String> list = new ArrayList<>();
list.add("aaa");
list.add("bbb");
String str = String.join(",", (String[])list.toArray());
4. String 转换为 ArrayList<String> :
String str ="1,2,3,4,5";
ArrayList<String> b = new ArrayList( str.split(‘,‘) ) ;
String、String[]、ArrayList<String>之间的转换
原文:http://www.cnblogs.com/steffen/p/7871990.html