作者:Rianbow_小渊渊设 | 来源:互联网 | 2023-02-01 12:20
Case 1:
int[] data1 = new int [] { 1, 2, 3 };
can be simplified as
可以简化为
int[] data2 = new [] { 1, 2, 3 };
Case 2:
int[][] table1 = new int[][] { new int[] { }, new int[] { 1, 2 } };
cannot be simplified as
不能简化为
int[][] table2 = new [][] { new int[] { }, new int[] { 1, 2 } };
Question:
For the second case, why cannot we just use [][]
instead of int[][]
?
对于第二种情况,为什么我们不能只使用[] []而不是int [] []?
1 个解决方案