int intArray[]={0,2,4,6,8}; int length=int Array.length();()
举一反三
- 下列在执行过程中不存在问题。( ) int intArray[]={0,2,4,6,8}; int length=int Array.length();
- 下列哪些是正确的声明变量的方式? A: int length; int width; B: int length, width; C: int length; width; D: int length, int width;
- 下面代码的输出是什么? int [][] array = {{1, 2},{3, 4},{5,6}}; int sum = 0; for(int i = 0; i < array.length; i++) sum = sum + array[i][0]; System.out.println(sum);[/i]
- 下列代码的执行结果是____。 Int length="Hello".length(); System.out.println(length); A: 5 B: 2 C: 10 D: 6
- Which statement below initializes array items to contain 3 rows and 2 columns? ( ) A: int[][] items = {{2, 4}, {6, 8}, {10, 12}}; B: int[][] items = {{2, 6, 10}, {4, 8, 12}}; C: int[][] items = {2, 4}, {6, 8}, {10, 12}; D: int[][] items = {2, 6, 10}, {4, 8, 12};