String str = "aaa,bbb,ccc";
String[] s = str.split(",");
String[] 转换为 String
String[] s = {"aaa","bbb","ccc"};
String str = String.join(",", s);
ArrarList<String> 转换为 String[]
ArrayList<String> list = new ArrayList<String>();
list.add("aaa");
list.add("bbb");
String[] s = (String[])list.toArray(new String[0]);
//或者
String[] s = new String[2];
list.toArray(s);
String[] 转换为 List<String>
String[] s = {"aaa","bbb","ccc"};
List<String> ls = Arrays.asList(s);
String[] 转换为 ArrayList<String>
String[] s = {"aaa","bbb","ccc"};
ArrayList<String> list = new ArrayList<String>(Arrays.asList(s));
String 转换为 Integer
String str = "123";
Integer a = Integer.valueOf(str);
String 转换为 int
String str = "123";
int b = Integer.valueOf(str).intValue();
//或者
int c = Integer.parseInt(str);
int 转换为 String
int i = 123;
String s = String.valueOf(i);
//或者
String s = Integer.toString(i);
//或者
String s = "" + i;