public class CtorDemo4 {
public static void main(String args[]) {
B bobj = new B();
System.out.println(bobj.a);
System.out.println(bobj.f());
}
}
class A {
int a = f();
int f() {return 1; }
}
class B extends A {
int b = 37;int f() {return b;}
}
public static void main(String args[]) {
B bobj = new B();
System.out.println(bobj.a);
System.out.println(bobj.f());
}
}
class A {
int a = f();
int f() {return 1; }
}
class B extends A {
int b = 37;int f() {return b;}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货