Intermediate
Object-Oriented Programming Concepts
Q41 / 100
What is the difference between "method overloading" and "method overriding"?
Correct! Well done.
Incorrect.
The correct answer is B) Overloading is multiple methods with the same name but different signatures in one class; overriding is a subclass redefining a parent method with the same signature
B
Correct Answer
Overloading is multiple methods with the same name but different signatures in one class; overriding is a subclass redefining a parent method with the same signature
Explanation
Overloading is resolved at compile time based on argument types/count; overriding is resolved at runtime based on the actual object type (dynamic dispatch).
Progress
41/100