- package com.zzg.java;
- public class Employee{
- private String name;
- private int id;
- private int pay;
-
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public int getId() {
- return id;
- }
- public void setId(int id) {
- this.id = id;
- }
- public int getPay() {
- return pay;
- }
- public void setPay(int pay) {
- this.pay = pay;
- }
- Employee(String name,int id,int pay){
- this.id=id;
- this.name=name;
- this.pay=pay;
- }
- }
- public class Manager extends Employee{
- private int commision;
- Manager(String name,int id,int pay,int commision){
- this.commision= commision;
- }
- }
复制代码 使用MYECLIPSE写了这一段程序,想用Manager继承Employee可是老是让我重命名为什么啊,求解释
附图
|
|