When to Serializable
& Externalizable
Can anybody clear me. When to implement Serializable
and when to implement Externalizable?
Umapada Manna Basically SERIALIZABLE uses default
implementation for reading and writing the object you want to persist.
For EXTERNALIZABLE you will have
to implement the readExternal() and writeExternal() methods.
Unless you have very specific requirements one wouldn't use EXTERNALIZABLE. SERIALIZABLE is the most common form of using. All you would specify is to implement the SERIALIZABLE interface in the class declaration and nothing more. Pallav
Do you have a Java Problem?
Java Books
Return to : Java Programming Hints and Tips All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|