java07接口与继承动手动脑
1.源代码:
package Work;
class A{
public A(){
System.out.println("Class A.");
}
public A(String string){
System.out.println("Class A."+string);
}}
class B extends A{
public B(){
super("string ");
System.out.print("Class B.");
}
}
public class Test01 extends B {
public static void main(String[] args) {
B b=new B();
}
}
运行: