一、字符串数组转换为List
String[] s = {"a","b","c"};
List list = Arrays.asList(s);
二、List转换为字符串数组
ArrayList<String> list=new ArrayList<String>();
String[] strings = new String[list.size()];
list.toArray(strings);
三、截取List中的一小段。
String[] strs = {"CAN","PEK","SHA","LAX"};
List<String> stations = Arrays.asList(strs);
String dep = "CAN";
String des = "SHA";
int fromIndex = stations.indexOf(dep);
int toIndex = stations.indexOf(des);
List<String> subList = stations.subList(fromIndex, toIndex);
虽然很基础,但是经常需要用到。