1.今天学习了用throws抛出异常。
示例:
public class ThrowsDemo{ public static void main(String[] args)throws Exception{ int x=5; int y=x/0; System.out.println(y); } }
2.没有遇到问题。
3.明天计划学习自定义异常。
1.今天学习了用throws抛出异常。
示例:
public class ThrowsDemo{ public static void main(String[] args)throws Exception{ int x=5; int y=x/0; System.out.println(y); } }
2.没有遇到问题。
3.明天计划学习自定义异常。