📄 employeedemo.java
字号:
package com.totyuedu.c69.a20080829;
public class EmployeeDemo {
public static void main(String[] args) {
Employee john = new Salesman("John", 24, 3000, "010-68003277",
"18# Yanan Road", "PG", "J1", "Zhang", 400000.0);
Employee scott = new Engineer("Scott", 26, 4000, "010-28997700",
"101# Xihu Road", "SL", "J2", "Liu", 8.5f);
Employee lily = new Clerk("Lily", 29, 5000, "010-60987455",
"101# Xihu Road", "PL", "ES", "Jin");
Employee lily2 = new Clerk(new String("Lily"), 29, 5000,
"010-60987455", "101# Xihu Road", "PL", "ES", "Jin");
// it's must be return true;
// if return false,the Employee's equals method must be wrong :-(
System.out.println(lily.equals(lily2));
System.out.println(john.getBonus());
System.out.println(scott.getBonus());
System.out.println(lily.getBonus());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -