可学答题网 > 问答 > Java认证考试综合练习题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

Which two code fragments correctly cr


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;}
参考答案
参考解析:
分类:Java认证考试综合练习题库
相关推荐

1、Given: Which code fragment, inserted

Given:Which code fragment, inserted at line 23, allows the code to compile?()Adf = new DateFormat();Bdf = Date.getFormat();Cdf = date.getFormat();Ddf = DateFormat.getFormat();Edf = DateFormat.getInstance()

2、Which code fragment, i

Which code fragment, inserted at line 24, outputs "123abc 123abc"?()Asb1.append("abc"); s1.append("abc")...

3、Which code fragments w

Which code fragments will succeed in initializing a two-dimensional array named tab with a size...

4、Which two commands correctly verify wh

Which two commands correctly verify whether port security has been configured on port FastEthernet 0/12 on a switch?()ASW1#show swithport port-s...

5、Which two code fragments are most like

Which two code fragments are most likely to cause a StackOverflowError?()ABCDEF

6、Given: Which code fragment

Given:Which code fragment, inserted at line 23, allows the code to compile?()Adf = new Da...