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 are the advantages of OOPL in a programming language? |
☺ | What is the difference between shadow and override in programming? |
☺ | What is Downcasting in Programming? |
☺ | Do you know about Object Oriented Programming Essentials and History? |
☺ | If a class is declared without any access modifiers, where may the class be accessed? |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |