public class Eddy {
public static void main (String args []) {
Boolean a[]=new Boolean[4];
int I= 1;
System.out.println(a[I]); }
}
What will be printed?
A:Compilation Error in Line 2
B:Compilation Error in line 4
C:Exception in Line 4
D:Will print true
E:Will print false
F:Will print null
这种题目考查的是对java的基本类型中的Boolean的理解程度。既然是Boolean类型,当然只有两种情况了true and false 怎么能声明成数组对象呢。
Therefore,this issue the result of:
F 也就是null