Thursday 11 January, 2007

Overloading Vs. Overriding

  • Overloading is nothing but static binding.

  • Overriding is dynamic binding which will be resolved at run-time.

  •  



  • Overloading deals with multiple methods in the same class with the same name but different signatures.

  • Overriding deals with two methods, one in a parent class and one in a child class, that have the same signature.

  •  



  • Overloading lets you define a similar operation in different ways for different data.

  • Overriding lets you define a similar operation in different ways for different object types.

  •  

    4 comments:

    Anonymous said...

    hi thanks a lot for the insight helped me......

    Anonymous said...

    thanks..it helps a lot :)

    aweida said...

    well put sir

    Anonymous said...

    Not necessarily dynamic binding