java程序中的try{}究竟是啥?又有啥作用呢?

inzaghizxy 2001-06-12 06:04:00
java程序中的try{}究竟是啥?又有啥作用呢?
...全文
156 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
hello_wyq 2001-06-13
  • 打赏
  • 举报
回复
捕获异常啊。
aph 2001-06-13
  • 打赏
  • 举报
回复
错误捕捉
oscarzhou88 2001-06-13
  • 打赏
  • 举报
回复
like VB:
on error goto err

code..

err:

code..
oscarzhou88 2001-06-13
  • 打赏
  • 举报
回复
Dylan 2001-06-12
  • 打赏
  • 举报
回复
try to find some errors in the {} .if find it, then lookup the catch,if the catch has the correct error type, then you can do something when this error occured,else the system will use itselfs' exception system to throw it.
dule_yu 2001-06-12
  • 打赏
  • 举报
回复
try和catch配对,用来捕捉在try实体中产生的异常。

62,615

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧