overloading and bla extends bla

if class A extends class B and they have both got the same name on a method but different arguments does his make it overloading still or is it overriding?thanks in advance.
[180 byte] By [blaea] at [2007-11-27 5:44:06]
# 1
It would be overloading.
floundera at 2007-7-12 15:24:28 > top of Java-index,Java Essentials,New To Java...
# 2

is it only overloading because they extend each other or would it be anyway?and if the arguments where the same would it still be overloading?sorry im asking so much but i'm having trouble understanding the whole overloading and overriding situations when its extending a class is involved,does it make a differance?thanks

blaea at 2007-7-12 15:24:28 > top of Java-index,Java Essentials,New To Java...
# 3

> is it only overloading because they extend each other

> or would it be anyway?

It's just overloading because you have a class that has two methods with the same name.

>and if the arguments where the

> same would it still be overloading?

No, that would be overriding, and only if that method is inherited.

> sorry im asking so

> much but i'm having trouble understanding the whole

> overloading and overriding situations when its

> extending a class is involved,does it make a

> differance?thanks

Yes, it does, to overriding. X defines an implementation that you want to change. If Y doesn't inherit it, there is nochting to change. You'd just be implementing yet another method.

CeciNEstPasUnProgrammeura at 2007-7-12 15:24:28 > top of Java-index,Java Essentials,New To Java...