Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • 1
    @raam86 instance is the object being serialized. You may think in the main method as a separate program which creates an object of type SerializationSample Commented Oct 3, 2012 at 14:31
  • 2
    @raam86 is the first statement in the main method: SerializationSample instance = new SerializationSample(); then the output is created and the object written to that output. Commented Oct 3, 2012 at 14:44
  • What would happen if you don't implement Serializable? How would that file be changed? Commented Oct 11, 2012 at 23:38
  • 1
    @jacktrades Why don't you try it. Just copy/paste the example and see "NotSerializableException" being thrown :) Commented Oct 12, 2012 at 19:45
  • 1
    @jacktrades because the computer hasn't been told that the object is allowed to be serialized :) what is meant by oos? Commented Aug 18, 2013 at 22:03