序列化問題
當(dāng)寫入多個(gè)對象時(shí),如何控制while語句,我寫的能運(yùn)行出來,不過有異常:Exception in thread "main" java.io.EOFException
while((stu2=(Student)ois.readObject())!=null){
????? ? System.out.println(stu2);
????? }
當(dāng)寫入多個(gè)對象時(shí),如何控制while語句,我寫的能運(yùn)行出來,不過有異常:Exception in thread "main" java.io.EOFException
while((stu2=(Student)ois.readObject())!=null){
????? ? System.out.println(stu2);
????? }
2016-01-19
舉報(bào)
2016-01-19
不能刪?。?!
2016-01-19
while((stu2=(Student)ois.readObject())!=-1){
????? ? System.out.println(stu2);
????? }