帮我写一个类名为Emp 的pojo类
时间: 2023-04-03 07:03:58 浏览: 105
好的,我可以帮您写一个类名为Emp的pojo类。这个类可以包含员工的基本信息,如员工编号、姓名、性别、出生日期、联系方式、入职日期、部门编号、职位等属性。同时,可以为这个类添加相应的构造方法和get/set方法,以便于在程序中使用。
相关问题
帮我写一个类名为Emp 的pojo类 代码
好的,以下是 Emp 类的代码:
```
public class Emp {
private int id;
private String name;
private int age;
private String gender;
private String department;
public Emp(int id, String name, int age, String gender, String department) {
this.id = id;
this.name = name;
this.age = age;
this.gender = gender;
this.department = department;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
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;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
}
```
帮我写一个类名为Emp 的pojo类java代码
好的,以下是Emp类的Java代码:
public class Emp {
private int id;
private String name;
private int age;
private String gender;
private String department;
private String position;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
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;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
}
阅读全文