That doesn't mean that B is serializable, though. You need to ensure that it does not contain non-transient fields that are not serializable.
Joined: Apr 26, 2008
If So, then Why In case Of servlets both GenericServlet and Httpservlet both are implementing Serializable interface,though Httpservlet extends GenericServlet .
Joined: Mar 22, 2005
There's no harm in class B declaring that it implements Serializable as well. It helps anyone looking at the source code or the javadocs, because they can see the implemented interfaces right away (without having to look at the superclass).