What is the Difference between Overriding and overloading?
Answer Posted / dev man
Overloading->
1) Same name, different parameter list or types of parameters.
2) Sub class method can overload a superclass method.
3) Method be different access specifier.
4) It doesn't need inheritance.
5) All method should be in same class.
6) data types can be different.
7) Return type can be different.
ex:
int add(int a, int b)
int add(float a , float b)
are overloaded methods
overriding->
1) Method should be public.
2) It needs inheritance and virtual keyword
3) It needs virtual keyword before it declaration.
4) Method must have same name with same parameter in
different class.
5) It requires non-static method.
6) Method should have same data type.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is a static class?
Describe about visual basic.net?
List the two main parts of .net?
When do you use virutal keyword?
What is the differences between dataset.clone and dataset.copy?
What is multiple form in vb?
how to get dynamic control array position or its index position?
Explain internal keyword in .net framework?
What are the technology areas that microsoft.net contains?
What are the different variables in vb.net?
Explain how to send xml file on server using http protocol?
What is DLL HELL in VB.NET
What is jagged array in vb.net?
What are the features of c# which are not present in vb.net?
How to execute VB.NET PROJECTS,VB6.0 PROJECTS AND write their test cases.Need Reply Urgently