what is overloading & overriding

Answer Posted / ashish

Overloading is a concept in OOPS where we have a similar
methods of same name but diferent signature.The return type
may be same or different but the signature has to be
different.It is an example of static polymorphism.

Overriding is a conecpt where we have the same method
(signature and return type) both is child class and parent
class. Now why we have the same method ? You will have that
thing happen when you want to add more funtionalities to a
method corresponding to your child class. This is an
example of runtime polymorphism

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

who is a protected class-level variable available to?

714


Explain the difference between const and static read-only?

694


Why is it not a good idea to use empty destructors?

731


Is static thread safe?

650


Can mvc be used for desktop applications?

684


Explain About Assembly in .NET, types of assemblies, their difference, How to register into GAC. How to generate the strong names & its use.

784


How to block a class from being inherited further?

665


Can abstract class have parameterized constructor?

683


How does dictionary work in c#?

641


How does bitwise work?

681


Different between method overriding and method overloading?

661


What's your approach to fetch static data in your windows form application?

706


What is an array class?

744


What is interface inheritance?

704


Compare and contrast between the System.Array.CopyTo() and Clone()?

740