asListpublic static <T> List<T> asList(T... a)Returns a fixed-size list backed by the specified array. (Changes to the returned list "write through" to the array.) This method acts as bridge between array-based and collection-based APIs, in combination with Collection.toArray(). The returned list is serializable and implements Randomaccess.This method also PRovides a convenient way to create a fixed-size list initialized to contain several elements: List<String> stooges = Arrays.asList("Larry", "Moe", "Curly");Parameters:a - the array by which the list will be backedReturns:a list view of the specified arrayasListpublic static <T> List<T> asList(T... a)返回一个受指定数组支持的固定大小的列表。(对返回列表的更改会“直接写”到数组。)此方法同 Collection.toArray() 一起,充当了基于数组的 API 与基于 collection 的 API 之间的桥梁。返回的列表是可序列化的,并且实现了 RandomAccess。此方法还提供了一个创建固定长度的列表的便捷方法,该列表被初始化为包含多个元素: List<String> stooges = Arrays.asList("Larry", "Moe", "Curly");参数:a - 支持列表的数组。返回:指定数组的列表视图。import java.util.Arrays;import java.util.List;public class AddingGroups { public static void main(String[] args) { List<Integer> list = Arrays.asList(16,17,18); System.out.println(list); //list.add(11); underlying array cannot be resized }}