Which two create an instance of an array?()
A: int ia = new int [15];
B: float fa = new float [20];
C: char ca = “Some String”;
D: Object oa = new float[20];
E: Int ia = (4, 5, 6) (1, 2, 3)
A: int ia = new int [15];
B: float fa = new float [20];
C: char ca = “Some String”;
D: Object oa = new float[20];
E: Int ia = (4, 5, 6) (1, 2, 3)
举一反三
- 创建数组正确的是: A: int[] ia = new int [15]; B: float fa = new float [20]; C: char[] ca = “Some String”; D: Object oa = new float[20]; E: Int ia [][] = (4, 5, 6) (1, 2, 3)
- 下列关于数组声明、初始话的语句,错误的是: A: int x[];x=new int[4]; B: int x[2]={1,2}; C: float y[][]=new float[2][3]; D: float[][] y=new float[2][];y[0]=new float[3];y[1]=new float[2];
- 下列数组定义正确的是( )。 A: int[] a[]= new float[2]; B: byte b[][]=new byte[3][]; C: String[] str=new String[3]; D: int my[][]=new int[3][3];
- 不正确语句的是: A: int rows=10; int []dataArray=new int[rows]; B: int []dataArray=int[100]; C: float dataArray []=new float[10]; D: float []dataArray =new float[100];
- 已知:int m=10;在下列语句中错误的是( ) A: int *p=new int(m); B: int *p=new int[m]={0}; C: float *p=new float(m); D: float *p=new float[m];