5.7 习题

1.以下声明数组的方式哪种不对?

A. int a[];

B. int[]a;

C. int[]a;

D. int[]a=new int{1,2,3,4,5};

2.int[]a={1,2,3,4,5};中被定义的数组a的长度是多少?

3.说明数组应用有什么好处。