explain method overridding method overloding with examples?

Answer Posted / senthamil kumaran

polymorphism can be divided into two tyes:-

Dynamic polymorphism or Run time polymorphism
Static polymorphism or Compile time polymorphism

Example for Static polymorphism
Method Overloading

Example for Dynamic polymorphism

Method Overriding



overloading: same method name but different argument list
is called as overloading

overriding:-same methodis redefined in the following
Derived classes with the same arugument list

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In struts, how can we access java beans and their properties?

768


In which method of action class the business logic is executed?

743


What is apache struts vulnerability?

707


How to upload struts file?

785


What is the purpose of '@keyproperty'?

788


Are the struts tags xhtml compliant ?

713


Is struts 1 still supported?

691


Why was reload removed from struts (since 1.1)?

745


What is struts2 namespace?

684


What is the default suffix for Struts2 action URI and how can we change it?

739


What are the Core classes of Struts Framework?

771


Describe the mvc on struts?

723


How to override the default error message that can come during file uploading process?

771


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

708


What do you mean by action errors and what are the results they force?

815