What is the Difference between Overriding and overloading?
Answer Posted / yugal
OVERLOADING is the process of declaring the methods having
the same name but diff signatures. Signature means diff
types & number of arguments.
OVERRIDING is the process of overwriting the methods of
base class in Derived Class.
Overriding is the example of run-time polymorphism and
Overloading is the example of compile-time polymorphism.
Overloading
1) Method can have different access specifier.
2) Method can have different return type
3) Method must have same name with different method
signatures.
4) It doesn't need inheritance as method should be in
same class.
Overriding->
1) Method must have same access specifier.
2) Method must have same return type.
3) Method must have same name with same method
signatures.
4) It needs inheritance and virtual keyword before it
declaration.
5) It requires non-static method.
| Is This Answer Correct ? | 27 Yes | 5 No |
Post New Answer View All Answers
Write program in VB.Net with SQL Server and Crystal Reports to develop a small windows application to add,edit,save, search and print Employee Information and send sourcecode as zip file. empcode : .............. empname : .............. dateofjoin : dd/mm/yyyy dateofbirth : dd/mm/yyyy TableName: EmpMaster EmpCode EmpName DOB DOJ TableName: EmpDocs EmpCode DocNo DocName ExpDate
Explain the difference between .dll extension and .exe extension files?
Explain jit?
what is difference between web.config and machine.config and where it will be ?
Explain the use of new keyword?
What are the different types of applications supported in .net (or) .net framework?
Explain the difference between vb 6 and vb.net?
Can we use Vb.Net and C# language simultaneously in one .Net application?
What is tracing?
Allowed program to auto-correct the database when loading a presentation.
What is late binding?
What are the types of generations in garbage collector?
Explain the difference between web.config and machine.config and where it will be ?
What is intermediate langauge?
How many ways the function can return values?