test file
[IRC.git] / Robust / src / Tests / Prefetch / ArrayTest.java
1 public class ArrayTest {
2     Item x;     
3     public ArrayTest() {
4     }
5     
6     public static void main(String[] args) {
7         ArrayTest[] n=new ArrayTest[10];
8         for(int i=0;i<10;i++) {
9             n[i]=new ArrayTest();       
10             n[i].x=new Item();
11             n[i].x.i=new Integer(10);
12         }
13         addItems(n);
14     }
15     
16     public static int addItems(ArrayTest [] array) {
17         int sum=0;
18         for(int i=0;i<array.length;i++) {
19             ArrayTest a=array[i];
20             sum=sum+a.x.i.intValue();
21         }
22         return sum;
23     }
24 }
25
26 public class Item {
27     Integer i;
28     public Item() {
29         
30     }
31
32 }