public class SerializableTest1
{
public static void main(String[] args) throws Exception
{
Person p1 = new Person("ZhangSan", 29, 1.78);
Person p2 = new Person("LiSi", 50, 1.7);
Person p3 = new Person("WangWu", 46, 1.67);
FileOutputStream fos = new FileOutputStream("Person.txt");// 当前项目路径下的一个文本文档
ObjectOutputStream oos = new ObjectOutputStream(fos);