Serializable vs Externalizable
What is difference between Serializable and Externalizable in Java is
famous core Java interview questions and for some of them its one of those
difficult Java question, which no one want to see in Java interview. I was on that category until I explored
How Serialization works in Java and find out more about Serialization process. What makes Serialization questions tricky is , Serialization as persistence mechanism is not very popular. Many programmer prefer database,
memory mapped file or simple text file over Serialization. But Serialization has a distinguished advantage over these mechanism. Java provides default mechanism to preserver object state and your job many time would be as simple as adding implements
Serializable on any class.In this article we will compare
Serializable to
Externalizable and see some c
ommon difference between Serializable vs Externalizable to tackle this Java question.