Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Employee
- {
- private String myEmployeeName;
- private int myTaxDeductions = 1;
- private String myMaritalStatus = "single";
- //--------- constructor #1 -------------
- public Employee(String EmployeName)
- {
- this(employeeName, 1);
- }
- //--------- constructor #2 -------------
- public Employee(String EmployeName, int taxDeductions)
- {
- this(employeeName, taxDeductions, "single");
- }
- //--------- constructor #3 -------------
- public Employee(String EmployeName,
- int taxDeductions,
- String maritalStatus)
- {
- this.employeeName = employeeName;
- this.taxDeductions = taxDeductions;
- this.maritalStatus = maritalStatus;
- }
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement