sharmistha mohapatra wrote:Is it possible to have the overriden method in the same class???
N Pats wrote:
Here, the anonymous inner class extends Test class and overrrides its method testMethod() and both of these methods (the overriding one - 3 and the overridden one - 1) lie in the same class Test - BUT method 3 is NOT a member function of Test class!!
Please correct me if i am wrong folks!
sudipto shekhar wrote:overriding = polymorphism
overloading != polymorphism
sudipto shekhar wrote: i remember "there is no polymorphism in overloading".
sudipto shekhar wrote: Overloading does not fulfill the contract of overriding hence there is no polymorphism in overloading..
It's about what we say to what is happening.I am just talking about the theory right now. I went through the above line in book by K&B "Head First Java".
sudipto shekhar wrote:Overloading does not fulfill the contract of overriding
sudipto shekhar wrote:
It says "There's no polymorphism involved with overloaded methods"
sudipto shekhar wrote:The term polymorphism when used with overloading makes the whole thing very confusing. In other books it is stated that polymorphism comes into play in terms of overloading.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton