当写入多个对象时,如何控制while语句,我写的能运行出来,不过有异常:Exception in thread "main" java.io.EOFException
while((stu2=(Student)ois.readObject())!=null){
System.out.println(stu2);
}
不能删!!!
while((stu2=(Student)ois.readObject())!=-1){
System.out.println(stu2);
}