标签:invoke forms print extend end ati ext void pack
分三部分,代码如下:
一部分
package Day07;
public class Employee extends Person {
public Employee() {
this ("(2) Invoke Employee‘s constructor");
System.out.println("(3) Perform Employee‘s task");
}
public Employee(String s) {
System.out.println(s);
}
}
第二部分
package Day07;
public class Faculty extends Employee {
public Faculty() {
System.out.println("(4) Perform Faculty‘s task");
}
public static void main(String[] args) {
new Faculty();
}
}
第三部分
package Day07;
public class Person {
public Person() {
System.out.println("(1) performs Person‘s task");
}
}
标签:invoke forms print extend end ati ext void pack
原文地址:http://www.cnblogs.com/F001li/p/7055890.html