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
☺ | What is the difference between shadow and override in programming? |
☺ | What are the advantages of OOPL in a programming language? |
☺ | Can a method be overloaded based on different return type but same argument type in programming? |
☺ | What is difference between overloading and overriding in programming language? |
☺ | Who were the three famous amigos and what was their contribution to the object community? |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |