1 public class ArrayStore2 2 { main(String[] args)3 public static void main(String[] args) 4 { 5 new ArrayStore2().a(new Object[2], 3); 6 } 7 a(Object[] oa, int i)8 void a(Object[] oa, int i) 9 { 10 try 11 { 12 oa[index()] = obj(); 13 } 14 catch (Exception x) 15 { 16 System.out.println (x.getClass().getName()); 17 } 18 } 19 index()20 int index() 21 { 22 System.out.println ("index"); 23 return 3; 24 } 25 obj()26 Object obj() 27 { 28 System.out.println ("rhs"); 29 return new Object(); 30 } 31 } 32