# Arrays.setAll()

// 快速初始化数组中的元素
List<Integer>[] cnt = new List<>();
Arrays.setAll(cnt,i -> new ArrayList<Integer>())

# Arrays.sort()

// 自定义排序
int[][] cnt = new int[n][m];
Arrays.sort(cnt,(a,b) -> (a[0],b[0]));
Integer[] cnt2 = new Integer[n]; // int[]数组无法使用lambda表达式
Arrays.sort(cnt,(a,b) -> (a - b))

# Arrays.copyOf()

// 复制数组
int[] cnt = new int[n];
int[] new_cnt = Arrays.copyOf(cnt,cnt.length);

# List.of()

List.of(str) // 返回的是一个final List<>

# Arrays.asList()

List<Integer> l = Arrays.asList(1,2,3); // [1, 2, 3]

# Collections.max()

int max = Collections.max(l);