Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Serialization via Inheritance  RSS feed

 
cool rishi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When a super class implements serializable interface, subclass does not implement serializable interface, Now in this case Can the subclass be serialized?
 
Anuj Prashar
Ranch Hand
Posts: 99
Android Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes if a superclass is Serializable, then all subclasses of that class automatically implement Serializable implicitly. A subclass of a class marked Serializable passes the is-a test for Serializable.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"cool rishi",
Did you check Campbell's PM ? See this thread. Thank you.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!