ArrayList a = new ArrayList(); //add many objects to the array list out.writeObject(a);
ArrayList a = (ArrayList)in.readObject();