What is default Serialization in Java? Serializable and Externalizable Interface

What is Serialization in Java
Serialization in Java is a process to persist any Java Object's state into File System or convert them into byte stream to transfer over the network to other JVM or program. Serialization in Java is done by JVM by employing default Serialization process which persists all of Object's state except transient variable and a static variable. How Serialization works in Java  is another popular Java Serialization interview question, well It's easy to make any Java class Serializable, the class needs to implements java.io.Serializable interface and JVM will automatically serialize its instance when passed over to java.io.ObjectOutputStream using writeObject(). Serializable interface is also called marker interface or tag interface because it does not contain any method or behavior and just used to tag a class, by seeing a class implementing Serializable JVM knows that it needs to serialize an instance of this class.
Read more »