F
Felix Chu
Can anyone please help me with this? I have two classes "parent" and
"child". The source code is below:
class parent {
void method1(parent p){};
}
class child extends parent {
void child_method() {
method1(super);
}
}
is method1(super) legal? I try to compile but the error message:
child.java:24: '.' expected
method1(super);
^
child.java:24: <identifier> expected
method1(super);
comes up.
Thanks in advance..
"child". The source code is below:
class parent {
void method1(parent p){};
}
class child extends parent {
void child_method() {
method1(super);
}
}
is method1(super) legal? I try to compile but the error message:
child.java:24: '.' expected
method1(super);
^
child.java:24: <identifier> expected
method1(super);
comes up.
Thanks in advance..