Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Employee {
- private String code;
- private String dept;
- private String name;
- private int age;
- public Employee(){
- this.code="";
- this.dept="";
- this.name="";
- this.age=0;
- }
- public Employee(String code, String dept, String name, int age) {
- this.code = code;
- this.dept = dept;
- this.name = name;
- this.age = age;
- }
- public String getCode() {
- return code;
- }
- public void setCode(String code) {
- this.code = code;
- }
- public String getDept() {
- return dept;
- }
- public void setDept(String dept) {
- this.dept = dept;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public int getAge() {
- return age;
- }
- public void setAge(int age) {
- this.age = age;
- }
- @Override
- public String toString() {
- return "Employee [code=" + code + ", dept=" + dept + ", name=" + name + ", age=" + age + "]";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement