写出运行结果: 。
public class abc{
public static void main(String args[ ]) {
SubSubClass x = new SubSubClass(10 , 20 , 30);
x.show();
}
}
class SuperClass{
int a,b;
SuperClass(int aa , int bb){
a=aa; b=bb;
}
void show( ){
System.out.println("a="+a+" b="+b);
}
}
class SubClass extends SuperClass{
int c;
SubClass(int aa,int bb,int cc){
super(aa,bb);
c=cc;
}
}
class SubSubClass extends SubClass{
int a;
SubSubClass(int aa,int bb,int cc){
super(aa,bb,cc);
a=aa+bb+cc;
}
void show(){
System.out.println("a="+a+" b="+b+" c="+c);
}
} |
|