17 lines
169 B
Text
17 lines
169 B
Text
|
// call an method from a superclass
|
||
|
|
||
|
class Main {
|
||
|
void main() {
|
||
|
C2 c;
|
||
|
c = new C2();
|
||
|
c.aux();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class C1{
|
||
|
void aux(){
|
||
|
write(2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class C2 extends C1 {}
|