java中继承,子类是否继承父类的构造函数 java继承中子类是不会继承父类的构造函数的,只是必须调用(隐式或者显式) 下面来看例子: public class TestExtends { public static void main(String[] args) { SonClass s = new SonClass(66); } } class FooClass{ public FooClass() { System.out.println(100); } public FooClass(…
java中: class Parent{ public void test(int a){ System.out.println("Parent:" + a); System.out.println(this.getClass().getName()); } } class Child extends Parent{ public void test(int a, int b){ System.out.println("Child:" + a + " &q…