source: trunk/gcc/libjava/testsuite/libjava.lang/ArrayStore2.java

Last change on this file was 2, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 445 bytes
Line 
1public class ArrayStore2
2{
3 public static void main(String[] args)
4 {
5 new ArrayStore2().a(new Object[2], 3);
6 }
7
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
20 int index()
21 {
22 System.out.println ("index");
23 return 3;
24 }
25
26 Object obj()
27 {
28 System.out.println ("rhs");
29 return new Object();
30 }
31}
Note: See TracBrowser for help on using the repository browser.