16 lines
No EOL
222 B
Text
16 lines
No EOL
222 B
Text
// The number of parameters when overriding a method must be equal
|
|
|
|
class Other {
|
|
void action() {
|
|
write(10);
|
|
}
|
|
}
|
|
|
|
class Main extends Other {
|
|
void action(int num) {
|
|
write(num);
|
|
return num + 1;
|
|
}
|
|
|
|
void main() {}
|
|
} |