• Post Reply Bookmark Topic Watch Topic
  • New Topic

serialization of subtypes of a serializable class  RSS feed

 
shankar sreeni
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The doc under Serializable interface states that "All subtypes of a Serializable class are themselves serializable."

But, i also find that the class javax.servlet.http.HttpServlet is declared to implement the Serializable interface even though its super class javax.servlet.GenericServlet is Serializable.

I am curious to know if is there any reason why a subtype could be declared as serializable when the super class is declared serializable, or am i missing something?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!