标签:column struct code def err extend override 关键字 over
inheritance
? Constructors are inherited, but use super()
public class Parent { public Parent() { do some code; } } public class Child extends Parent { public Child() { super(); // call Parent() do some more code; } } so in a main method: Child c = new Child(); // Calls Parent(), too
Default constructor == no parameters
第72页,子类能加新方法吗?
标签:column struct code def err extend override 关键字 over
原文地址:https://www.cnblogs.com/immiao0319/p/10090591.html