+ 4
What is the different between overloading and overridden? Does constructor and Destructor same?
3 Answers
+ 5
Overriding ties in with inheritance.
For example the parent class Mod has a method "report(int num)", in the child class GoldMod, you want the report method to do something different, you override it. Note that the method signature remains the same.
Now in our GoldMod class, we want report() to work differently if a char is given as an input. Hence, when you want to use a different method signature, you overload.
Note the difference.
+ 2
good vai
0
thank so much đđ Dark Angel