black

SCJP程序员认证考试

登录

多项选择题

Which code fragments will succeed in initializing a two-dimensional array named tab with a size that will cause the expression tab[3][2] to access a valid element?()  
CODE FRAGMENT a:  int[][] tab = {  { 0, 0, 0 },  { 0, 0, 0 }  };  
CODE FRAGMENT b:  int tab[][] = new int[4][];  for (int i=0; i  
CODE FRAGMENT c:  int tab[][] = {  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0  };  
CODE FRAGMENT d:  int tab[3][2];  
CODE FRAGMENT e:  int[] tab[] = { {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} };  

A.Code fragment a.
B.Code fragment b.
C.Code fragment c.
D.Code fragment d.
E.Code fragment e.

相关考题

单项选择题 Itisdesirablethatacertainmethodwithinacertainclasscanonlybeaccessedbyclassesthataredefinedwithinthesamepackageastheclassofthemethod.Howcansuchrestrictionsbeenforced?()

多项选择题 WhichofthesearekeywordsinJava?()

单项选择题 Which statements, when inserted at the indicated position in the following code, will cause a runtime exception when attempting to run the program?()   class A {}   class B extends A {}   class C extends A {}   public class Q3ae4 {   public static void main(String args[]) {   A x = new A();   B y = new B();   C z = new C();   // insert statement here   }   }

All Rights Reserved 版权所有©易学考试网(yxkao.com)

备案号:湘ICP备2022003000号-3