Java 泛型

泛型数组

Java 的泛型数组是一坨屎 但是 可以这么创建数组的数组

List<Integer>[] adj = new ArrayList[n];
adj[0] = new ArrayList<>();

Last updated

Was this helpful?