// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.*;

public class ArrayRef {
   public static void main(String[] args) {
      double[] d = new double[1];
      ArrayList list = new ArrayList();
      d[0] = 1;
      list.add(d);
      d[0] = 2;
      list.add(d);
      System.out.println(((double[])list.get(0))[0] + " " + ((double[])list.get(1))[0]);
   }
}
