大家帮忙看看关于Exceptions的题目?try{},catch(){},finally{}三者之间的关系???

pensincun 2001-12-30 02:36:24
Which of the following statements about try, catch, and finally are true?
Select all valid answers.

a) A try block must always be followed by a catch block

b) A try block can be followed either by a catch block or a finally block, or both

c) A catch block must always be associated with a try block

d) A finally can never stand on its own (that is, without being associated with try block)

e) None of these are true

answer
帮帮偶!正确答案是???为什么???
...全文
126 点赞 收藏 13
写回复
13 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
vbstudent 2002-01-29
哦。
回复
caolyf 2001-12-31
BCD
回复
menghao 2001-12-31
b,c,d
回复
Luke_cn 2001-12-31
b try 可以跟catch,也可以跟finally,或者全部
c catch不可以存在于没有try的环境中
d finally 也是这样
回复
pensincun 2001-12-31
请继续关注!!!
回复
jsyx 2001-12-31
a肯定错了,bcd
回复
chl326 2001-12-31
明显bcd
回复
renrzg 2001-12-31
BCD
回复
Patrick_DK 2001-12-31
A C D
回复
binghuodao 2001-12-31
b
c
d
回复
jxta 2001-12-30
事实证明,存在 'finally' without 'try'的错误,因此d is right
c is right
b is right eg.
try{
}
finally{}
编译通过
存在'catch' without 'try'错误,因此 a should be right!
回复
chenly 2001-12-30
c
回复
网络咖啡 2001-12-30
a
c
d
回复
相关推荐
发帖
非技术区
创建于2007-09-28

2.3w+

社区成员

Java 非技术区
申请成为版主
帖子事件
创建了帖子
2001-12-30 02:36
社区公告
暂无公告