显式调用基类的构造方法
class Employee {/** 来 自 时代Java - nowjava.com**/ private String name = "Unknown"; public Employee(String name) { this.name = name; } public void setName(String name) { this.name = name; } public String getName() { return name; } } class Manager extends Employee { /* from N o w J a v a . c o m*/ public Manager(String name) { super(name); } } public class Main { public static void main(String[] args) { Manager mgr =