importjava.io.*;publicclassDemo{publicstaticvoidmain(String[]args)throwsIOException,ClassNotFoundException{Stringfilename="file.dat";/***将对象写入文件*/ObjectOutputStreamobj=newObjectOutputStream(newFileOutputStream(filename));Students=newStudent("boy"...
查看全文