62,615
社区成员
发帖
与我相关
我的任务
分享
ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(
"t.txt"));
Customer c = new Customer("aaa", 11);
out.writeInt(1);
out.writeObject(c);
Customer c2 = new Customer("bbb", 12);
out.writeInt(2);
out.writeObject(c2);
out.flush();