Android java.io.NotSerializableException 错误

 java.io.NotSerializableException是没有序列化。当一个类序列化后,它的子类无需再序列化了,它的子类可以去继承父类的序列化。


public class TestClass implements Serializable{

public String name;

public Person person;

}


TestClass 类被序列化了,在TestClass 中有一个Person类,这个Person必须要序列化,不然就会抛出NotSerializableException异常。


猜你喜欢

转载自blog.csdn.net/u010560898/article/details/46808397
今日推荐