package 类和对象;public class Example4_9{public static void main(String[] args) {Employee2.setMin(600);Employee2 e1 = new Employee2("张三",29,3000);System.out.println("e1中员工最低工资:" + e1.getMin());Employee2 e2 = new Employee2("李四",22,300);System.out.println("e2中员工最低工资:" + e2.getMin());e1.raise(500);e2.raise(400);}}class Employee2 {String name;int age;double salary;static double min_salary;public Employee2(String n,int a,double s){name = n;age = a;salary = s;}public static double getMin(){return min_salary;}public static void setMin(double min){min_salary = min;}void raise(double p){if(salary < min_salary)salary = min_salary;elsesalary = salary+p;System.out.println(name + "涨工资之后的工资为:" + salary);}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。