source:
trunk/src/gcc/libjava/testsuite/libjava.lang/ArrayStore2.java@
141
| Last change on this file since 141 was 2, checked in by , 23 years ago | |
|---|---|
|
|
| File size: 445 bytes | |
| Line | |
|---|---|
| 1 | public 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.
