11.13 第十一次、
package GJS; public abstract class GJS { private String name; public GJS(String name) { this.name=name; } public String getName() { return this.name; } public abstract void fun(); }
package GJS; public class GJS1 extends GJS { public GJS1(String name) { super(name); } public void fun() { System.out.println(super.getName()); } }
package GJS; public class DemoAB { public static void main(String[] args) { GJS1 b =new GJS1("XXXXXX"); b.fun(); } }