抽象类可以没有抽象方法,不能被实例化 father class /** * */ package testAbstract; /** * @author 2172980000502 * */ public abstract class Father { protected void fatherSay() { // TODO Auto-generated method stub System.out.println("I am a father class!"); } } son class /** * */ package testAbstract; /** * @author 2172980000502 * */ public class Son extends Father { protected void sonSay() { // TODO Auto-generated method stub System.out.println("I am a son class!"); } } 应用入口 /** * */ package testAbstract; /** * @author 2172980000502 * */ public class TestAbstract { /** * @param args */ public static void main(String[] args) { // father class can not been new // Father f = new Father(); Son s = new Son(); s.sonSay(); } }