This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Serializable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Serializable" Watch "Serializable" New topic
Author

Serializable

Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2370

In Struts Javadoc of org.apache.struts.action.ActionForm class, I found the following entry (http://struts.apache.org/api/index.html).

ActionForms are JavaBeans, subclasses should also implement Serializable, as required by the JavaBean specification.

But as we know from Java language basics, if a super class A implements an interface X, then any instance of subclass of class A, for example B that extends class A, will be automatically an instance of C as well. Then why a subclass of ActionForm should implement Serializable again as ActionFrom itself implements Serializable interface?



Ashik Uzzaman
Senior Member of Technical Staff, Salesforce.com, San Francisco, CA, USA.
 
jQuery in Action, 2nd edition
 
subject: Serializable