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...

explain method overridding method overloding with examples?

Answer Posted / muthusenthil

method overloading is to load some extra features in
existing method eg: a method takes string as an arguments
but overloaded method may take int along with String
trapPerson(String name)- pre-existing method
trapPerson(String name,int age)- overloaded method
(irrespective of return type)
this may take place in same class or derived clas

method overridding is to override a method from parentclass
to change its behaviour.name should be same as parentclass
method, behaviour may change
it should takes place between derived class
eg: class man extends superman
int walk() be one among characterstics of man overridden by
superman.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of form bean in struts?

972


What is the default suffix for struts2 action uri ?

1009


What does the term struts mean?

1037


What are best practices to follow while developing Struts2 application?

1117


What is used to display the intermediate result in an interceptor?

1000


What are different Struts2 tags? How can we use them?

999


how to develop the submit and search operations in single jsp using struts?

3057


What are the ways in which duplicate form submission can occur?

999


How many action classes can be used in struts application?

1023


Where can I get help with struts?

1050


When should be opt for struts framework?

1084


How does one create an action in struts 2?

1003


What is the use of token interceptor in Struts2?

1123


What is the purpose of @result?

1066


Can a reducer dispatch an action?

999