网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
多选题
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)


参考答案

参考解析
解析: 暂无解析
更多 “多选题Which two create an instance of an array?()Aint ia = new int [15];Bfloat fa = new float [20];Cchar ca = “Some String”;DObject oa = new float[20];EInt ia = (4, 5, 6) (1, 2, 3)” 相关考题
考题 在下述Java语言语句中,错误的创建数组的方法是()A.int int Array[];int Array=new int[5];B.int int Array[]=new int[5];C.int[]int Array={1,2,3,4,5};D.int int Array[5]={1,2,3,4.5};

考题 下列数组定义及赋值,错误的是( )。A.int a[]={1,2,3,4,5};B.int intArray[];C.int Array=new int[3]; int Array[1]=1; int Array[2]=2; int Array[3]=3;D.int a[][]=new int[2][]; a[0]=new int[3]; a[1]=new int[3];

考题 请选出创建数组的正确语句。() A.float f[][] = new float[6][6];B.float []f[] = new float[6][6];C.float f[][] = new float[][6];D.float [][]f = new float[6][6];

考题 Which two code fragments correctly create and initialize a static array of int elements() A.static final int[]a={100,200};B.static final int[]a;static{a=new int[2];a[0]=100;a[1]=200;}C.static final int[]a=new int[2]{100,200};D.static final int[]a;static void int(){a=new int[3];a[0]=100;a[1]=200;}

考题 下面______不是创建数组的正确语句。A.float f[] f[] = new float[5][5];B.float f[][] = new float[5][5];C.float f[][] = new float[][5],D.float [][] f= new float[5][];

考题 public class X {  public object m () {   object o = new float (3.14F);   object oa = new object [1];   oa[0]= o;   o = null;   return oa[0];   }   }   When is the float object created in line 3, eligible for garbage collection?()A、 Just after line 5B、 Just after line 6C、 Just after line 7 (that is, as the method returns)D、 Never in this method.

考题 下列语句中,可以创建数组实例的有()。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、int ia [][]= {4,5,6} {1,2,3};

考题 若有定义 class A{int x,y; static float f(int a){…} float g(int x1,int x2){…}} 及A a1=new A( );则下列用法中非法的是( )。A、g(3,2)B、f(3)C、a1.f(4)D、a1.g(2,5)

考题 Which two code fragments correctly create and initialize a static array of int elements()A、static final int[]a={100,200};B、static final int[]a;static{a=new int[2];a[0]=100;a[1]=200;}C、static final int[]a=new int[2]{100,200};D、static final int[]a;static void int(){a=new int[3];a[0]=100;a[1]=200;}

考题 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)

考题 Which two cause a compiler error?() A、 float[] = new float(3);B、 float f2[] = new float[];C、 float[] f1 = new float[3];D、 float f3[] = new float[3];E、 float f5[] = { 1.0f, 2.0f, 2.0f };F、 float f4[] = new float[] { 1.0f. 2.0f. 3.0f};

考题 1. public class X (  2. public object m ()  {  3. object o = new float (3.14F);  4. object [] oa = new object [1];  5. oa[0]= o;  6. o = null;  7. return oa[0];  8. }  9. }   When is the float object created in line 3, eligible for garbage collection?()  A、 Just after line 5B、 Just after line 6C、 Just after line 7 (that is, as the method returns)D、 Never in this method.

考题 1. public class X {  2. public object m ()  {  3. object o = new float (3.14F);  4. object [] oa = new object [1]; 5. oa[0]= o;  6. o = null;  7. oa[0] = null;  10. return o;  9. }  10. }  When is the float object created in line 3, eligible for garbage collection?()  A、 Just after line 5.B、 Just after line 6.C、 Just after line 7.D、 Just after line 8(that is, as the method returns).

考题 Which two code fragments correctly create and initialize a static array of int elements?()A、static final int[] a = { 100,200 };B、static final int[] a; static { a=new int[2]; a[0]=100; a[1]=200; }C、static final int[] a = new int[2]{ 100,200 };D、static final int[] a; static void init() { a = new int[3]; a[0]=100; a[1]=200; }

考题 单选题若有定义 class A{int x,y; static float f(int a){…} float g(int x1,int x2){…}} 及A a1=new A( );则下列用法中非法的是( )。A g(3,2)B f(3)C a1.f(4)D a1.g(2,5)

考题 多选题下面哪个语句正确地声明一个整型的二维数组?()Aint a[ ][ ] = new int[][];Bint a[10][10] = new int[][];Cint a[ ][ ] = new int[10][10];Dint [ ][ ]a = new int[10][10];Eint [ ]a[ ] = new int[10][10];

考题 多选题Which two code fragments correctly create and initialize a static array of int elements()Astatic final int[]a={100,200};Bstatic final int[]a;static{a=new int[2];a[0]=100;a[1]=200;}Cstatic final int[]a=new int[2]{100,200};Dstatic final int[]a;static void int(){a=new int[3];a[0]=100;a[1]=200;}

考题 多选题Which two cause a compiler error?()Afloat[] = new float(3);Bfloat f2[] = new float[];Cfloat[] f1 = new float[3];Dfloat f3[] = new float[3];Efloat f5[] = { 1.0f, 2.0f, 2.0f };Ffloat f4[] = new float[] { 1.0f. 2.0f. 3.0f};

考题 单选题哪个语句创建了一个数组实例?()A int[] ia= new int [15];B float fa= new float [20];C char[] ca= “Some String”;D int ia [][]= {4,5,6} {1,2,3};

考题 单选题以上哪种创建数组不正确()A int[] a = {1,2,3,4,5}B int[] a = new int[2]C int[][] b = new int[][2]D int[][] b = new int[2][];

考题 单选题下列的数组定义语句,不正确的是()。A int a[]=new int[5]{1,2,3,4,5}B int[,]a=new inta[3][4]C int[][]a=new int[3][];D int[]a={1,2,3,4};

考题 单选题下面的方法重载,正确的是()。A int fun(int a, float b) { } float fun(int a, float b) { }B float fun(int a, float b) { } float fun(int x, float y) { }C float fun(float a) { }  float fun(float a, float b) { }D float fun1(int a, float b) { } float fun2(int a, float b) { }

考题 单选题1. public class X (  2. public object m ()  {  3. object o = new float (3.14F);  4. object [] oa = new object [1];  5. oa[0]= o;  6. o = null;  7. return oa[0];  8. }  9. }   When is the float object created in line 3, eligible for garbage collection?()A  Just after line 5B  Just after line 6C  Just after line 7 (that is, as the method returns)D  Never in this method.

考题 单选题下面关于数组声明和初始化的语句哪个有语法错误()A int a1[]={3,4,5};B String a2[]={string1,string1,string1};C String a3[]=new String(3);D int[][] a4=new int[3][3];

考题 多选题Which two code fragments correctly create and initialize a static array of int elements?()Astatic final int[] a = { 100,200 };Bstatic final int[] a; static { a=new int[2]; a[0]=100; a[1]=200; }Cstatic final int[] a = new int[2] { 100,200 };Dstatic final int[] a; static void init() { a = new int[3]; a[0]=100; a[1]=200; }

考题 多选题下列语句中,可以创建数组实例的有()。Aint[] ia = new int [15];Bfloat fa = new float [20];Cchar*+ ca =“Some String”;DObject oa = new float[20];EInt ia [][] =(4,5,6)(1,2,3)