被序列化的类要implements Serializable
ObjectOutputStream 将类存放到文件中
ObjectInputStream将类从文件中读出来
同样可以把Map序列化到文件中,因为HashMap已经implements Serializable
被序列化的类要implements Serializable
ObjectOutputStream 将类存放到文件中
ObjectInputStream将类从文件中读出来
同样可以把Map序列化到文件中,因为HashMap已经implements Serializable