a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 147|回复: 0

[考试试题] 2011年JAVA认证模拟题(40)

[复制链接]
发表于 2012-8-4 12:33:16 | 显示全部楼层 |阅读模式
  Q118 Which of the following are true about local inner classes?& T1 S' G9 |5 q/ o. B) \
  A They are not associated with an instance of an outer (enclosing) class.# M2 M  \8 c1 C  B
  B They may access final initialized variables and parameters that are in the scope of the statement block in which the class is declared.1 D2 a# h1 p: D  b7 z/ F6 O1 G! P. o
  C They may be declared public, protected, or private.
  N: r9 x! \, S  D They may not implement an interface.* [& }. _- l3 V# `( c5 }
  Q119 Which of the following are true?" M) s9 y; G  l+ s4 G, N, Q
  A A reference to an array can be cast to a reference to an Object.$ |: v9 S9 ~9 G
  B A reference to an array can be cast to a reference to a Cloneable.
7 V/ k5 R: _2 T0 O; l, r+ [  C A reference to an array can be cast to a reference to a String.  l/ a7 l' Y/ t6 L
  D None of the above.( X& _1 F( K  I( U0 m# e* M
  Q120 What is the output of the following program?
1 e+ Y- S) J: _0 f2 A, v" X- k  public class Question {
: f0 b6 r) y- Y8 b  public static void main (String args[])7 Z% b2 |1 C& ?0 E0 t$ ]; T$ }
  {( U0 ^- ?  c' c, E
  boolean[] b = new boolean[2];+ [1 x. G/ V9 Z
  double[] d = new double[2];
: t; ?4 p' X  t4 f' _  h  System.out.print(b[0]);. ]) u9 u* Q8 M. h* \# A$ j0 K
  System.out.println(d[1]);
, |: o* K0 z. g( `9 Y) ^  \  }9 {) J1 v; h, Y- p! W/ U" T
  }; V/ e: q$ k: s$ ~3 V
  A true0.0
% _! P$ @# f0 B0 i) V  B true0
6 A" M) G( j6 f& N* o  x  C false0.0" l# c2 Q9 o& F9 B
  D false07 E$ y  e) I  a% L* v) W+ G( K
  Q118 AB
5 \1 X- z" F" y6 M$ m  Q119 AB
, E! l- }9 N$ [( _  [# w2 m. I% c  Q120 C
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-5-17 23:18 , Processed in 0.203549 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表