Possible Duplicate:
Why does HttpServlet implement Serializable?
This question suddenly came up couple of days ago in an internal discussion and we don't seem to find any suitable answer for the same . Can anyone point me in the right direction ?
The questions :
1) Why is HttpServlet
in java implements serializable
? I do not seem to find any logical reason for the same.
2) While trying to figure out this I looked at the api doc and found some thing interesting
public abstract class HttpServlet extends GenericServlet
implements Serializable
Now, what is of interest is that GenericServlet
also extends Serializable
. So both the parent and child class implements serializable . Isn't that an anti-pattern?