Retro68/gcc/libjava/testsuite/libjava.lang/ArrayStore2.java

32 lines
445 B
Java
Raw Normal View History

2012-03-27 23:13:14 +00:00
public class ArrayStore2
{
public static void main(String[] args)
{
new ArrayStore2().a(new Object[2], 3);
}
void a(Object[] oa, int i)
{
try
{
oa[index()] = obj();
}
catch (Exception x)
{
System.out.println (x.getClass().getName());
}
}
int index()
{
System.out.println ("index");
return 3;
}
Object obj()
{
System.out.println ("rhs");
return new Object();
}
}