[单项选择题] 阅读下面代码 public class Arrays public static void main(String[] args) int[] a=new int[5]
17 查阅
[单项选择题] 阅读下面代码
public class Arrays
public static void main(String[] args)
int[] a=new int[5];
for(int i=0;i<a.length;i=i+1)a[i]=10+i;
for(int i=0;i<a.length;i=i+1)System.out.println(a[i]);
String[] s="Frank","Bob","Jim";
for(int i=0;i<s.length;i=i+1)System.out.println(s[i]);
s[2]="Mike";
System.out.println(s[2]);
代码运行正确的结果是
A. 10
11
12
13
14
Mike
Bob
Frank
Jim
B. 11
12
13
14
15
Frank
Bob
Mike
Jim
C. 10
11
12
13
14
Frank
Bob
Jim
Mike
D. 11
12
13
14
15
Mike
Jim
Bob
Frank
参考答案: