Search This Blog

Thursday, 5 May 2011

Overloading And Overriding Concepts

Method Overloading:
Method overloading in Java is nothing but two or more functions having same function name but with different parameters and signatures.

This can be implemented by compile time polymorphism

Method Overriding:

Method overriding in java is nothing but the function present in super class is overrides the function in sub class in other way add additional functionality to the function in super class
One thing to be noted down is
the function names in super class and sub class are same with signatures also..
Method overriding can be implemented by runtime polymorphism.