Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

why do we typecast ActionForm into out plain java bean
class in Action class?

Answer Posted / jagadeesh b.n

Bcoz as u all know, casting are of 2 types Upcast(implicit)
and Downcast(Explicit)in core java.....Upcasting means
converting lower datatype(int) to higher datatype(long) and
Downcast means its a viceversa of upcast...(long to int)...

As u know in struts ActionForm is a superclass where as ur
Java bean program is a simple class with private fields and
set/get methods for conversion of superclass to sublclass
we use typecasting in struts...

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is Struts2?

1058


What is ognl?

1124


What are interceptors in struts 2?

1010


How do u provide security to ur project?(Banking domain project)

4870


What is the role of action class in struts?

1013


Explain about the library tag?

976


What is the use of resourcebundle.properties file in Struts Validation framework?

1057


What’s the difference between validation.xml and validator-rules.xml files in struts validation framework?

996


What is the use of interceptor?

959


What is the use of reset method of ActionForm class?

1026


What is the purpose of action tag in struts.xml?

1008


What is apache struts framework?

949


What is the purpose of @beforeresult annotation?

1014


What is pojo in struts2?

1002


For a single Struts application, can we have multiple struts-config.xml files?

975