DEVFYI - Developer Resource - FYI

What is the difference between Serializalble and Externalizable interface?

Java Interview Questions and Answers (part 1)


(Continued from previous question...)

19. What is the difference between Serializalble and Externalizable interface?

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.

(Continued on next question...)

Other Interview Questions