对象流Object ,对象要先序列化才能写入;

import java.io.Serializable; //先写出一个Student类方便new对象 ,重写toString方法方便输出; public class Student implements Serializable{ //这里要实现Serializable接口,这是标记接口,相似 colenable接口;告诉程序该对象可被序列化; private static final long
相关文章
相关标签/搜索