a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 111|回复: 1

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

[复制链接]
发表于 2012-8-4 12:33:16 | 显示全部楼层 |阅读模式
Q61 Suppose that classes X and Y are subclasses of Z and Z implements the W interface. Which of the following are true?   A A reference to an object of class X can be cast to a reference to an object of class Y.
  ^: X/ O+ E9 K. e+ `" Q  B A reference to an object of class Y can be cast to a reference to an object of class X.: ^# s+ D: s# u6 N
  C A reference to an object of class X can be cast to a reference to an object of class Z.. [: W0 q2 ?8 H. y( q& W
  D A reference to an object of class Y can be cast to a reference to an object of class Z.& t5 ?: `' G2 D) S2 _2 g( E" |
  E A reference to an object of class X can be cast to a reference to an object of interface W.- N( }6 I, v3 D  r
  F A reference to an object of class Y can be cast to a reference to an object of interface W.
6 V( G4 X% f: Q2 z. _( W/ d; p  G A reference to an object of class Z can be cast to a reference to an object of interface W.4 R- O0 t& J  j
  Q62 Which of the following are characteristic of a fully encapsulated class?
  F3 t; [& V1 e( F  A All variables are private.
& X2 R# D5 B# o% D, [) ]& v  B All methods are private.
回复

使用道具 举报

 楼主| 发表于 2012-8-4 12:33:17 | 显示全部楼层

2011年JAVA认证模拟题(21)

</p>  C Methods are provided to access the class’s properties.% _9 f* r- A1 C+ s" n# ~
  D The class’s design may be changed with minimal impact on its implementation.
5 k' F" }  _! \4 m) l  Q63. What output is displayed as the result of executing the following statement?6 U9 F& x6 W/ H- k4 i
  System.out.println( “ // Looks like a* w% M2 b; u/ C1 c& K( X. o$ w! V
  comment.”);5 n3 Z1 H6 Y# P9 A3 B/ i- d
  A // Looks like a comment.  w+ n+ H2 O; V# G, B
  B / Looks like a comment.
; \4 d% ?5 I- n! v1 E1 g  C No output is displayed.+ K% ^7 `- m( ]3 p7 N8 q
  D The statement results in a compilation error.- G+ Y2 a( H9 V: B  A
  Q061 CDEFG
, b2 Y2 _5 P' n  Q062 AC6 b- s. _+ U) @" `
  Q063 A
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-6-4 17:18 , Processed in 0.210843 second(s), 24 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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