What is difference between overloading and overriding in programming language?
Submitted by: AdministratorDifference between overloading and overriding in programming language is:
a) In overloading, there is a relationship between methods available in the same class whereas in overriding, there is relationship between a superclass method and subclass method.
b) Overloading does not block inheritance from the superclass whereas overriding blocks inheritance from the superclass.
c) In overloading, separate methods share the same name whereas in overriding, subclass method replaces the superclass.
d) Overloading must have different method signatures whereas overriding must have same signature.
Submitted by: Administrator
a) In overloading, there is a relationship between methods available in the same class whereas in overriding, there is relationship between a superclass method and subclass method.
b) Overloading does not block inheritance from the superclass whereas overriding blocks inheritance from the superclass.
c) In overloading, separate methods share the same name whereas in overriding, subclass method replaces the superclass.
d) Overloading must have different method signatures whereas overriding must have same signature.
Submitted by: Administrator
Read Online Programming Job Interview Questions And Answers
Top Programming Questions
☺ | Who were the three famous amigos and what was their contribution to the object community? |
☺ | Can a method be overloaded based on different return type but same argument type in programming? |
☺ | If a class is declared without any access modifiers, where may the class be accessed? |
☺ | What are the advantages of OOPL in a programming language? |
☺ | What is meant by “method-wars” in Programming? |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |