由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - question about Exeption
相关主题
Java on AIXWhere I can find comparison of JVMs
Re: 怎样不用main(String args[])输出"hello worlAsk a simple question about throw exception, bow bow bow
No decent way for input password from command line.Test your PC speed
线程hardy会一直等待下去么?折腾了一天,实在是绝望了,请教请教
Help! ClassCastExceptionRe: how to initialize corba object orb in servlet
Spring Library Bug?说说clone咋违反了类继承的原则来的?
这段程序的输出是什么? 为什么java String
怎么样的面试问题算刁钻?Re: unix环境下如何在java程序中执行命令行?
相关话题的讨论汇总
话题: throws话题: exeption话题: main话题: public话题: question
进入Java版参与讨论
1 (共1页)
s*****p
发帖数: 7
1
As far as I understand, a method can "throws" exceptions to be handled by its
caller. But I just found an example like this:
public class Test {
public static void main(String[] args)
throws InterruptedException {
......
Thread.sleep();
}
}

I just wonder that who will handle the exception "throws" by the main().
Thank you very much.
h**j
发帖数: 2033
2
JVM

【在 s*****p 的大作中提到】
: As far as I understand, a method can "throws" exceptions to be handled by its
: caller. But I just found an example like this:
: public class Test {
: public static void main(String[] args)
: throws InterruptedException {
: ......
: Thread.sleep();
: }
: }
:

1 (共1页)
进入Java版参与讨论
相关主题
Re: unix环境下如何在java程序中执行命令行?Help! ClassCastException
Re: [转载] 如何看某个端口是否被占用?(use UNIX command or ..)Spring Library Bug?
JAVA APPLICATION PATH 一问这段程序的输出是什么? 为什么
两个很基本的JAVA问题怎么样的面试问题算刁钻?
Java on AIXWhere I can find comparison of JVMs
Re: 怎样不用main(String args[])输出"hello worlAsk a simple question about throw exception, bow bow bow
No decent way for input password from command line.Test your PC speed
线程hardy会一直等待下去么?折腾了一天,实在是绝望了,请教请教
相关话题的讨论汇总
话题: throws话题: exeption话题: main话题: public话题: question