• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why java.io.Serializable again?

 
Ashik Uzzaman
Ranch Hand
Posts: 2373
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just curious! We know that GenericServlet class implements java.io.Serializable which is a tag interface. Then why HTTPServlet which is a subclass of GenericServlet implements that tag interface again?
I know that Serializable is a marker pointing that the objects instantiated from this class may be serialized. But that functionality has already been fulfilled by GenericServlet class. So was it really necessary to mark the HTTPServlet class again? Or i m missing something....

------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!
 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
also I got the same question about Servlet interface. Why?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13077
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those interfaces are probably mentioned in the code just to remind you what the class does.
 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in that case, HttpServlet should implements ServletConfig interface too. LOL
[This message has been edited by Win Yu (edited October 29, 2001).]
 
Ashik Uzzaman
Ranch Hand
Posts: 2373
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks William. I knew that it was just only a marker, a better thinking process will be reminder....
------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic