下列程序标注的【代码1】,【代码2】的输出结果是什么?public class E {public static void main(String args[]) {int [] a={10,20,30,40},b[]={{1,2},{4,5,6,7}};b[0] = a;b[0][1] = b[1][3];System.out.println(b[0][3]); //【代码1】System.out.println(a[1]); //【代码2】}}
【单选题】阅读下面的Java代码int[] arr;int n = 5;n = n * 2 +1;arr = new int[n];System.out.println(arr.length);程序输出的结果是()
A. 5
B. 8
C. 10
D. 11
【单选题】在Java语言中,下列代码的输出结果是()public static void main(String[] args) { int[] num={10,20,51,40,50}; System.out.println(num[2]);}
A. 40
B. 50
C. 51
D. 60
【单选题】在JAVA语言中,下列代码的运行结果是()public static void main(String args[]) { int stuAge[] = {18,22,26}; int i, avgAge = 0; for(i = 0; i < 3; i++){ avgAge += stuAge[i] / 3; } System.out.println( avgAge );}
A. 0
B. 9
C. 11
D. 21