Arrays和Collection之间的转换

1.将数组转换成固定大小的列表:

public static <T> List<T> asList(T... a)

参数 T... a:数组元素
返回值 List<T>:数组元素的类型的列表

Arrays和Collection之间的转换

2.将集合转换成数组

Arrays和Collection之间的转换