哪位大佬能不能把完整的代码发出来看一下?
哪个大佬能不能把完整的代码发出来让我看一下,我自己一个菜鸟,好多地方写不出来
哪个大佬能不能把完整的代码发出来让我看一下,我自己一个菜鸟,好多地方写不出来
2018-02-26
//People类 package com.immoc; public class People { public void say() { System.out.println("人类具有说话的能力"); } } //Chinese类 package com.immoc; public class Chinese extends People { public void say() { System.out.println("中国人说中国话"); } } //American类 package com.immoc; public class American extends People { public void say() { System.out.println("美国人说英语"); } } //Test类 package com.immoc; public class Test { public static void main(String[] args) { People ch=new Chinese(); People am=new American(); ch.say(); am.say(); } } //APeople类 package com.immoc; public abstract class APeople { public abstract void say(); }
使用APeople类的时候把Chinese,American,Test类中的People改成APeople
举报