a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 110|回复: 1

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

[复制链接]
发表于 2012-8-4 12:33:16 | 显示全部楼层 |阅读模式
81. What is the output of the following code?
" G3 W/ ]& b0 u* N# G; I) R7 K8 e& J+ S3 k0 N: S- i$ b+ Z
outer: for(int i=1; i
回复

使用道具 举报

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

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

83. How do you declare a native method?
+ l! M7 G- e% g( w% }& QA. public native method();
( w. {- f- z! Q- q5 j$ \& F8 M$ HB. public native void method();" E$ b" g% V# Y, M/ [
C. public void native method();3 W% q' ~( C( L6 V
D. public void native() {}
3 W2 A% d/ d, q6 }9 |" k* TE. public native void method() {}
- p7 M% @- S& H, U2 O1 SB.
0 k" h/ F% f# G  c84. Given the following code, what is the output when a exception other than a NullPointerException is thrown?; E) ?/ u* P( I( n6 a4 l9 Y+ Z
try{: t* P4 `! o" j  n
//some code
' F; J' H- m! S/ p* W/ K0 j3 n}( y/ E0 y  R, i" O8 G
catch(NullPointerException e) {
" x4 A' S% R( p* @5 c  ]* dSystem.out.println("thrown 1");+ e& i: r1 j7 {3 h' P: O0 e. y
}, I: p$ X& O) b/ Y$ o0 D7 V5 s" w
finally {6 n$ K, G: _1 x% e& P
System.out.println("thrown 2");
5 c0 @4 A7 n' t% }}  O  b6 {' y2 E% Y0 g$ X0 X
System.out.println("thrown 3");
; O( Y; b% L7 S" x# M7 A: UA thrown 1
# x- m  t0 G0 g7 AB thrown 2/ y* p+ h) M0 _8 p
C thrown 32 c4 g- D) u: y% `3 S( h
D none
2 a1 s7 i4 Q; ~7 {9 u1 O' J* gBC.
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-6-2 13:38 , Processed in 0.214835 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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