If I have 3 classes say A and It Implements java.io.Serializable . And I have B ,which is subclass of A. If I want to serialize B , B also implements java.io.Serializable. If not Why HttpServlet implements java.io.Serializable as GenericServlet already implements it. Please clarify me .
Thanks in Advance
Raj
Technically, not necessary.
Note that
Serializableis just a marker interface. So, by explicitly implementing it, you’re basically saying (marking) that you are aware of the Serializable restrictions/contract and designed accordingly.