a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 109|回复: 1

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

[复制链接]
发表于 2012-8-4 12:33:16 | 显示全部楼层 |阅读模式
81. What is the output of the following code?# j6 U5 Y1 h8 V( S
# H! H  g) }$ Z8 H, E
outer: for(int i=1; i
回复

使用道具 举报

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

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

83. How do you declare a native method?
' O1 A9 U5 M3 Q; H9 s  UA. public native method();
/ k$ u" D* q5 sB. public native void method();) H' E, G% Z" \6 N1 W% R
C. public void native method();# I' F# L% ]" `
D. public void native() {}7 S" B) f6 S' T9 s- n' \
E. public native void method() {}
5 H! {3 L# d# j% o8 [2 l5 qB.4 P0 e  r$ M# P
84. Given the following code, what is the output when a exception other than a NullPointerException is thrown?& I; L8 p# A# h1 R# ~
try{
6 }1 P" ], {$ F) h//some code$ _- t% I- d! H2 V
}
3 c& ?7 I7 C3 W! {7 w# a* mcatch(NullPointerException e) {( @' K# L( S& z7 F
System.out.println("thrown 1");
3 Z, ]/ Z/ ^  r: e}) ?$ F( c7 Z  [( s+ M! h- V, B
finally {
( y* G2 o( M5 A+ BSystem.out.println("thrown 2");3 j) b* w% n& b' O# d: N
}! l7 v2 {$ l3 G' ~6 Y2 h
System.out.println("thrown 3");
) V/ J5 _" ~$ AA thrown 1
/ v1 k) J3 @( V; w, @+ uB thrown 2
  J9 k8 c% p7 q# P- s+ p- j8 |C thrown 3" \0 M: J& A( A, c
D none
. z& R6 L& R  e* z; M$ F! b2 D9 KBC.
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-19 04:10 , Processed in 0.289959 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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