explain method overridding method overloding with examples?

Answer Posted / manoj jain

overriding and overloading both are type polymorphism.
overloading:-more then one functions or constructors have
same name but different signature is called overloading.
this is also called compile time polymorphism or static
polymorphism.

overriding:-method in child class has same name as in
parent class(function name and signature will be same in
parent and child class)that is called overriding.
child class method hides parent class method it is also
called bynamic binding or runtime polymprphism

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the role of action class in struts?

567


What are pull and push mvc architecture and which architecture does struts2 follow?

514


What is the purpose of action-mappings tag in struct-config.xml?

602


What is the difference between empty default namespace and root namespace?

566


What is the use of token interceptor in Struts2?

631






How is declarative handling of exceptions done in struts ?

484


How to explain Software Bank Loan descriptions

1909


What is the purpose of @validations annotation?

578


What is the purpose of struts.properties in struct2?

537


What is the purpose of @emailvalidator?

572


Explain the complete struts validator framework.

585


What is the front controller in struts2?

513


What is the purpose of @key annotation annotation?

608


How can we group related actions in one group in Struts?

572


What is the flow of requests in struts based applications?

571