aspose file tools
The moose likes Beginning Java and the fly likes Serialization via Inheritance Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Serialization via Inheritance" Watch "Serialization via Inheritance" New topic
Author

Serialization via Inheritance

cool rishi
Greenhorn

Joined: Sep 07, 2009
Posts: 2
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

Joined: Apr 15, 2008
Posts: 99

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.


SCJP 5,SCWCD 5, RHCT
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14672
    
  11

"cool rishi",
Did you check Campbell's PM ? See this thread. Thank you.


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Serialization via Inheritance
 
Similar Threads
is Serialization Inherited
serialization question
Why does serialization require a serial version UID in the subclasses of the implementing class.
Why both GenericServlet and HttpServlet implements Serializable interface ?
what is the output