多选题
What is the correct way to create an array with five int data types? (Choose all that apply.)
A. int intArray = new int[5];
B. int intArray = new int(5);
C. int[] intArray = new int[5];
D. int intArray[] = new int [5];
A
B
C
D
【正确答案】
C、D
【答案解析】
C是声明一个数组的首选方法。D正确,但是没有遵循标准的规范。A和B不正确。
提交答案
关闭