I have a class, let's call it "x". I have another class, y, which
extends x. Then I have a class z which extends y. There is a
function in y (but not in x) which I have overridden in z. But when I
try to run the program, it uses the version of the function in y! I
have heard that java doesn't support multiple inheritance, so could
this be the problem?
So basicall: is there a rule in java which I am violating by trying to
have a class extend a class extending a class? And if so, what can I
do to work around it?
extends x. Then I have a class z which extends y. There is a
function in y (but not in x) which I have overridden in z. But when I
try to run the program, it uses the version of the function in y! I
have heard that java doesn't support multiple inheritance, so could
this be the problem?
So basicall: is there a rule in java which I am violating by trying to
have a class extend a class extending a class? And if so, what can I
do to work around it?
Comment