SCJP 5.0 and now fighting with ExtJS
sharmistha mohapatra wrote:Is it possible to have the overriden method in the same class???
Fiona
SCJP 5.0 and now fighting with ExtJS
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!
All code in my posts, unless a source is explicitly mentioned, is my own.
sudipto shekhar wrote:overriding = polymorphism
overloading != polymorphism
SCJP 6
sudipto shekhar wrote: i remember "there is no polymorphism in overloading".
SCJP 6
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
sudipto shekhar wrote: Overloading does not fulfill the contract of overriding hence there is no polymorphism in overloading..
SCJP 6
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
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"
SCJP 6
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Author @ http://www.ideasforideas.org/
Moody blogger who do not like to behave like target setting machines work.
All code in my posts, unless a source is explicitly mentioned, is my own.
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.
All code in my posts, unless a source is explicitly mentioned, is my own.
Don't get me started about those stupid light bulbs. |