question about Exeption# Java - 爪哇娇娃
s*p
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.
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.