Skip to content

Explain the Externalizable interface?

Posted in Education, and WhoCodeFirst

The Serializable interface gets us automatic serialization capability for objects of our class. On the other hand, the Externalizable interface provides a way to implement a custom serialization mechanism.

A class that implements the Externalizable interface is responsible to save and restore the contents of its own instances.

The Externalizable interface extends the Serializable interface and provides two methods to serialize and deserialize an object, writeExternal() and readExternal().

Happy Learning! 😇

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Exit mobile version