Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GenericServlet Vs HttpServlet

 
Harikrishna Gorrepati
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

GenericServlet class implements Serializable interface.
HttpServlet extends Genericservlet implements Serializable interface. Becuase HttpServlet extends GenericServlet, HttpServlet will be automatically implements Serializable interface know.. Why API says HttpServlet implementes Serializable interface also. I feel it is kind of duplicate. Please advice..Thanks
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18225
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just because a base class is serializable doesn't guarantee that a subclass might not include non-serializable elements.
 
Harikrishna Gorrepati
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tom, Can you please make your statement simple. I am not clear. Thanks
Tim Holloway wrote:Just because a base class is serializable doesn't guarantee that a subclass might not include non-serializable elements.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic