a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 62|回复: 0

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

[复制链接]
发表于 2012-8-4 12:33:16 | 显示全部楼层 |阅读模式
  Q157 Which of the following are true?
& w- R+ c- ~  ^+ V+ e2 o" l  T  A If a package statement is included in a source code file, it must appear as the first non-blank line.9 j$ h! O0 k( Y/ k# _: }; f, t
  B If an import statement is included in a source code file, it must appear as the first non-blank line.
/ P7 o8 n2 A" s0 _+ t% b, e9 `7 t  C If a main() method is included in a source code file, it must appear as the first non-blank line.
' d8 z- p' \( A- F  D If a public interface is declared in a source code file, it must have the same name as the source code file.2 t- [/ v: l4 h' n8 b  D, _' z  L
  Q158 Which of the following are true about this method declaration?" D; R0 o5 f7 j0 F* O) T
  void myMethod (String s) {
& R3 u7 X/ q: Z2 H  Z9 ^% N' ^  }' i, p  l9 e% F! m, d8 }& K
  A myMethod() is static
# n( W, }" ^" ]  B myMethod() does not return a value.
4 i. S# ^$ G  a) h  C myMethod() is abstract.
5 N0 _" b, S1 T# h  D myMethod() may not be accessed outside of the package in which it is declared.
$ w' a7 @6 C) `; m  Q159 If an object with a finalize() method has been garbage collected, which of the following are true about that object?
/ a0 ]6 x3 D$ v6 T  A The object became unreachable.2 _% r! }6 L  }( R  W
  B The object’s finalized() method was invoked by the garbage collector." W- Q" J5 a6 i
  C The memory used by the object is subject to reuse.# s2 `; t3 M, G  {7 j1 I' x
  D The object did not implement any interfaces.
! k( k9 A& W4 u% x# s/ G  Q157 AD
( k' W/ @8 y; g7 A% b  Q158 BD$ B- ~! s. t1 _5 f5 U* ?& L. x1 ?4 X
  Q159 ABC
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-21 08:57 , Processed in 0.274536 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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