a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 191|回复: 1

[考试试题] JAVA认证历年真题:310-025精选题(39)

[复制链接]
发表于 2012-8-4 12:33:16 | 显示全部楼层 |阅读模式
310-025精选题(39)的具体内容如下:
; r* k9 Z3 V$ M, d/ l9 y; R163. Which of the following statements about Java's garbage collection are true? A. The garbage collector can be invoked explicitly using a Runtime object.
' a# \% x$ D, M. E: cB. The finalize method is always called before an object is garbage collected.
. \# R- u. \( S2 G+ v% JC. Any class that includes a finalize method should invoke its superclass' finalize method.
6 g- X4 ]' N$ }  O$ O& u% X+ {0 WD. Garbage collection behaviour is very predictable.& ^% p4 N, Q# p) b7 O
ABC.
, A& g  l9 H! [1 B$ u+ h5 ^2 M164. What line of code would begin execution of a thread named myThread?
+ K# n  G/ e7 r: |7 g! qAnswer:, g7 b9 w  s+ m5 r1 j" k2 q
myThread.start();- o( W* Y& y, u2 X5 W6 }
165. Which methods are required to implement the interface Runnable?
) \8 M: }: R1 j5 B9 ~4 ]5 K" hA.wait()
0 P( m6 V. |% R8 ?B.run()
5 w! m. c/ Q3 u6 \C.stop(): u) |7 n( h) `* p
D.update()
. [" X, c) F7 K9 t7 R5 n6 vE.resume()1 m. L# P8 O( o6 ]" m  j
B.
3 M! ?( b/ S) m  q$ j1 B166. What class defines the wait() method?
. n5 d% T* s6 g. yAnswer:
- c+ ^6 ~! {: W. X% ]4 s4 l$ EObject.
' ~+ G  }# [/ U6 `for yield(), sleep(#), start(), run() it is Thread
3 U* R3 b# y" n& {/ x) zfor wait(), notify(), notifyAll() it is Object
7 ]" |6 F0 U3 D( A167. For what reasons might a thread stop execution?9 R: X+ S4 d( p% w" X
A. A thread with higher priority began execution.
, l  m+ Z' e7 `& U6 ^4 K7 Y  WB. The thread's wait() method was invoked.) H% s6 b, A6 I0 x6 _% {1 J
C. The thread invoked its yield() method.
! K- m) G" K! I8 AD. The thread's pause() method was invoked.; ?  y  O9 g% l
E. The thread's sleep() method was invoked.8 `; `! Z' j# V5 N, K& W: M( }
ABCE.
回复

使用道具 举报

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

JAVA认证历年真题:310-025精选题(39)

168. Which method below can change a String object, s ?
( B/ D& a. M; A. R0 z6 CA. equals( s )! Z2 ~0 A2 D1 Z& p6 }) H7 |
B. substring( s )
7 j% N" C7 T0 O3 D9 aC. concat( s )
* @" k5 H3 \1 I: Z" {D. toUpperCase ( s )& e6 P! _0 [9 r' W
E. none of the above will change s
- \9 ], P2 ~% j4 X5 o) O1 g3 yE.# R, q. u7 H1 @. c0 M
169. If s1 is declared as:& m3 N2 Q* _7 j( E) M" \( W6 x- j
String sl = "phenobarbital";8 c( |0 V! }* O5 t
What will be the value of s2 after the following line of code:8 @: Q5 K6 E- I/ o% O
String s2 = s1.substring( 3, 5 );- X9 i9 W6 s  |) E
A. null
4 R1 \: D# m* _! `  |' kB. "eno"
* f* W1 G2 @3 t6 SC. "enoba"
2 `0 K) |' q9 l( a  N# vD. "no"
% X! Z3 c' h/ u6 _7 e6 uD.! |) ~0 R# w+ u$ D8 u, n
170. What method(s) from the java.lang.Math class might method() be if the statement method(-4.4)== -4; is true.2 q$ I8 K/ J  b& t
A. round()
# ?  E/ }& o. CB. min()  @  V1 B$ q; N  }' u  f  K
C. trunc()
/ z7 q* w" P/ v  OD. abs()3 c# p! Y$ v9 a
E. floor()
1 M7 k; L7 d$ D! O7 ]7 TF. ceil()) H8 H$ L" k2 M& e/ P
AF.
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-6-10 23:32 , Processed in 1.939325 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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