16 lines
206 B
Text
16 lines
206 B
Text
|
// The main method can be overridden in the inherit process, as any other method can
|
||
|
|
||
|
class A {
|
||
|
void main() {
|
||
|
write(1);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class B extends A {
|
||
|
void main() {
|
||
|
write(2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class Main extends B {}
|