UNB/ CS/ David Bremner/ teaching/ old/ cs1083/ java/ PVReader2.java
import java.io.ObjectInputStream;
import java.io.FileInputStream;

public class PVReader2{
    public static void main(String [] args)
        throws java.io.IOException,
               java.lang.ClassNotFoundException{
        ObjectInputStream in =
            new ObjectInputStream(
                 new FileInputStream("people2.dat"));
        try {
            while(true){
                Person somebody=(Person)in.readObject();
                System.out.println(somebody);
            }
        }
        catch (java.io.EOFException e){}
    }
}