Why do we need to implement the Serializable interface?
In some respects marker interfaces such as Serializable are like a prompt or reminder to programmers that we must implement the interface to get the results we need; most importantly we must ensure that the class is truly serializable. A class must implement the Serializable interface else any attempt to serialize an instance will throw a NotSerializableException. However, it is the programmer’s responsibility to ensure that an instance can physically be serialized and de-serialized in a meaningful way, so that the object’s original state can be fully restored. That can be a complex task, especially when a class has field types that are final and do not implement the Serializable interface, hence the interface is a marker that special measures need to be taken. Actions: Follow-up or correct this answer. Submit a new question.