What is the difference between Serializalble and Externalizable interface?

Q

What is the difference between Serializalble and Externalizable interface?

✍: Guest

A

When you use Serializable interface, your class is serialized automatically by default. But you can override writeObject() and readObject() two methods to control more complex object serailization process. When you use Externalizable interface, you have a complete control over your class's serialization process.

2012-05-29, 2516👍, 0💬