初学JAVA到异常这里,有个问题想问!
package   my.java; 
 import   static   java.lang.System.out;   
 public   class   CatchWho2 
 { 
             public   static   void   main(String[]   args) 
 	{ 
 	try 
 	            { 
 	            try 
 		{ 
 		throw   new   
ArrayIndexOutOfBoundsException(); 
 		} 
 	            catch(ArithmeticException   e) 
 		{ 
 		out.println( "Trigger   a   ArithmeticException...Inner... "); 
 		} 
 	            throw   new   ArithmeticException(); 
 	            } 
 	catch(ArithmeticException   e) 
 	            { 
 	            out.println( "Trigger   a   ArithmeticException...Outer "); 
 	            } 
 	catch(Array
IndexOutOfBoundsException   e) 
 	            { 
 	            out.println( "Trigger   a   ArrayIndexOutOfBoundsException...Outer "); 
 	            } 
 	} 
 }   
 为什么只捕获了一个ArrayIndexOutOfBoundsException异常? 
 而不捕获ArithmeticException异常呢?
------解决方案--------------------因为你这个属于一个try catch 
 它捕获到一个就结束跳出了 
 所以第一个throw new ArrayIndexOutOfBoundsException(); 
 抓住就结束了
------解决方案--------------------抓住一个异常就会不 执行其它的代码了