下列数组初始化语句哪些是正确的
A: int[] nums = new int[]{0,1,2,3,4};
B: int[] nums2 = {0,1,2,3,4,5};
C: int[][] num_1 = {new int[]{0,1},new int[]{0,1,2},new int[]{0,1,2,3}};
D: int[][] num_2 = {{0,1},{0,1,2},{0,1,2,3}};
A: int[] nums = new int[]{0,1,2,3,4};
B: int[] nums2 = {0,1,2,3,4,5};
C: int[][] num_1 = {new int[]{0,1},new int[]{0,1,2},new int[]{0,1,2,3}};
D: int[][] num_2 = {{0,1},{0,1,2},{0,1,2,3}};
举一反三
- 下列数组初始化语句哪些是正确的 A: int[] nums = new int[]{0,1,2,3,4}; B: int[] nums2 = {0,1,2,3,4,5}; C: int[][] num_1 = {new int[]{0,1},new int[]{0,1,2},new int[]{0,1,2,3}}; D: int[][] num_2 = {{0,1},{0,1,2},{0,1,2,3}};
- 下列数组初始化语句哪些是正确的 A: int[] nums = new int[]{0,1,2,3,4}; B: int[] nums2 = {0,1,2,3,4,5}; C: int[][] num_1 = {new int[]{0,1},new int[]{0,1,2},new int[]{0,1,2,3}}; D: int[][] num_2 = {{0,1},{0,1,2},{0,1,2,3}};
- 下列数组初始化语句哪些是正确的 A: int[] nums = new int[]{0,1,2,3,4}; B: int[] nums2 = {0,1,2,3,4,5}; C: int[][] num_1 = {new int[]{0,1},new int[]{0,1,2},new int[]{0,1,2,3}}; D: int[][] num_2 = {{0,1},{0,1,2},{0,1,2,3}};
- 下列数组初始化语句哪些是正确的?(3分) A: int[] nums = new int[]{0,1,2,3,4}; B: int[] nums2 = {0,1,2,3,4,5}; C: int[][] num_1 = {new int[]{0,1},new int[]{0,1,2},new int[]{0,1,2,3}}; D: int[][] num_2 = {{0,1},{0,1,2},{0,1,2,3}};
- 下列数组初始化语句哪些是正确的?(3分) A: int[] nums = new int[]{0,1,2,3,4}; B: int[] nums2 = {0,1,2,3,4,5}; C: int[][] num_1 = {new int[]{0,1},new int[]{0,1,2},new int[]{0,1,2,3}}; D: int[][] num_2 = {{0,1},{0,1,2},{0,1,2,3}};