vineet dhar wrote:
Polymorphism is mainly related with method overriding............
Overloading is a compile time Polymorphism .. while Overriding is a runtime Polymorphism.
Just analyze, when you try to overload a method, if the signature of it does'nt suits the specs of an overload it will give you a Compile time error..... since the JVM compiler checks it before .... now when you override a method from a parent to a child class, then depending on the Object (Parent/Child) which you have instantiated irrespective of its reference, the overrided method gets called from that object ... this decision is made at runtime