Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

The difference between Serializable and Externalizable

807591Mar 10 2008 — edited Mar 30 2008
I have read the doc. on both interfaces but I don't know exactly the difference between
Serializable and Externalizable.
I know that using Serializable you don't have to take care of the serialization yourself
but in Externalizable you have to.
But if you implement the read/writeObject in Serializable then isn't that the same
thing as to implement Externalizable and read/writeExternal?
Also, how come that the first non-serializable super class of a serilizable class need
to have a empty constructor?
Regards
/Fredrik
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 27 2008
Added on Mar 10 2008
2 comments
288 views