1 2 3 7 8 9 class T151241rs2 { 10 static int i = 0; 11 static T151241rs2 a() { throw new RuntimeException (); } 12 static void b(int i) { System.out.print("Oops "); } 13 static T151241rs2 t = null; 14 T151241rs2 t1 = null; 15 16 T151241rs2() {} 17 T151241rs2(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.b(i++); } catch (NullPointerException e) { 27 System.out.print("1 "); 28 } 29 T151241rs2[] ta = {}; 30 try { 31 ta[0].b(i++); } catch (ArrayIndexOutOfBoundsException e) { 33 System.out.print("2 "); 34 } 35 try { 36 a().b(i++); } catch (RuntimeException e) { 38 System.out.print("3 "); 39 } 40 Object o = ""; 41 try { 42 ((T151241rs2)o).b(i++); } catch (ClassCastException e) { 44 System.out.print("4 "); 45 } 46 try { 47 ("" + new T151241rs2()).valueOf(1); System.out.print("Oops "); 49 } catch (ArithmeticException e) { 50 System.out.print("5 "); 51 } 52 try { 53 new T151241rs2(1).b(i++); } catch (IllegalArgumentException e) { 55 System.out.print("6"); 56 } 57 if (i != 0) System.out.print("Oops "); 58 } 59 } 60 61 | Popular Tags |