Professional Documents
Culture Documents
Getsalary Java
Getsalary Java
class Employee
{
private int salary;
public Employee(int salary)
{
this.salary = salary;
}
emp.work();
System.out.println("Employee salary: " + emp.getSalary());
mgr.work();
System.out.println("Manager salary: " + mgr.getSalary());
mgr.addEmployee();
}
}