compiler-design-eth/javali_tests/HW3_nop90/InheritanceTests/OverrideTests/ErrorOverrideNumberParams.javali

16 lines
222 B
Text
Raw Permalink Normal View History

2020-01-15 22:32:25 +01:00
// 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() {}
}