What is the Difference between Overriding and overloading?

Answer Posted / prachee

overloading has same method but different types of
parameters, number of parameters.

overloading does not take return type to differentiate
overloaded method.

ex:
int add(int a, int b)
int add(float a , float b)
are overloaded methods

overriding comes with inheritance concept.
here parent and child both contains the same method. and
when execution takes place; child's method is called.

Is This Answer Correct ?    124 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is enumerator?

569


How to retrieve images in sql server database through vb.net?

525


What is the difference between vb 6 and vb.net?

639


How to execute VB.NET PROJECTS,VB6.0 PROJECTS AND write their test cases.Need Reply Urgently

2002


Explain strong name in .net assembly?

527






What is the main use of a namespace?

515


Can you please explain the difference between thread and process?

523


What is the feature which is common to all .net languages?

469


What is redim keyword?

577


Write a program that would find the nth term of a geometric progression, given the value of first term and common ratio. Any inbuilt function that the language provides for calculating exponent should not be used.

3112


What is the advantage of using system.text.stringbuilder over system.string?

610


What is the difference between convert.tostring and i.tostring method?

557


What is the differences between dataset.clone and dataset.copy?

638


Explain the difference between value and reference types?

456


What is code access security?

686