1 2 3 9 10 class T15111rs2 { 11 static int i = 0; 12 static T15111rs2 a() { throw new RuntimeException (); } 13 static T15111rs2 t = null; 14 T15111rs2 t1 = null; 15 16 T15111rs2() {} 17 T15111rs2(int i) { throw new IllegalArgumentException (); } 18 public String toString() { 19 int i = 0; 20 i /= i; return null; 22 } 23 public static void main(String [] args) { 24 try { 25 t.t1.i++; } catch (NullPointerException e) { 27 System.out.print("1 "); 28 } 29 T15111rs2[] ta = {}; 30 try { 31 ta[0].i++; } catch (ArrayIndexOutOfBoundsException e) { 33 System.out.print("2 "); 34 } 35 try { 36 a().i++; } catch (RuntimeException e) { 38 System.out.print("3 "); 39 } 40 Object o = ""; 41 try { 42 ((T15111rs2)o).i++; } catch (ClassCastException e) { 44 System.out.print("4 "); 45 } 46 try { 47 new T15111rs2(1).i++; } catch (IllegalArgumentException e) { 49 System.out.print("5"); 50 } 51 if (i != 0) System.out.print("Oops "); 52 } 53 } 54 55 | Popular Tags |