摘要:
[在程序中抛出异常] 在程序中抛出异常,一定要使用关键字throw. throw+异常实例对象。 1 public class Demo2 { 2 public static void main(String[] args) { 3 int a = 10; 4 int b = 0; 5 try{ 6 if(b==0) throw new ArithmeticException("除数不能为零!"); 7 else 8 System.out.prin... 阅读全文
posted @ 2013-10-12 15:20
平林新袖
阅读(284)
评论(0)
推荐(0)

浙公网安备 33010602011771号