What does the following Java code output when trying to deserialize a list of Person objects from "people.dat", assuming the file exists and contains valid serialized Person objects?
import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.List;
public class DeserializePeople {
public static void main(String[] args) {
try (ObjectInputStream ois = new ObjectInputStream(new FileInputStream("people.dat"))) {
List<Person> people = (List<Person>) ois.readObject();
for (Person p : people) {
System.out.println(p.getName());
}
} catch (Exception e) {
System.err.println("Error reading people");
}
}
}