Spring源码中的代码风格

风格一:父类中定义方法,子类中直接调用

public abstract class SuperCase{
    public SuperCase(String message){
        System.out.println("输出父类的方法");
    }

}

父类抽象类中,定义构造方法,子类中调用时,直接使用super进行调用

public class ABTest extends SuperCase {

    public static void main(String[] args) {
        ABTest abTest = new ABTest();
    }

    public ABTest(){
        super("hello world");
    }
}
原文地址:https://www.cnblogs.com/anyanpeng/p/15342992.html