I have created a java program which works with java I/O. I have implemented Serializable interface, but it still cause java.io.NotSerializableException on the following part of my code while I am trying to write objects into a file:
oos.writeObject(ep);
How it is possible while I am implementing serializable? should I do another works besides 开发者_运维知识库implementing this interface?
Usually that means, that another object that your object you are trying to serialize holds a reference to is not serializable. If you post your code and the exceptions stacktrace it would be a lot easier to tell.
精彩评论