previous | start | next

Write and Read an ArrayList to a File

Write

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


Read
ArrayList a = (ArrayList)in.readObject();



previous | start | next