package js;
public class Employee {
private int id;
private String giao;
private String creator ;
public Employee() {
super();
}
public Employee(int id,String name,String creator)
{super();
this.id=id;
this.giao=name;
this.creator=creator;
}
public int get_Id() {
return id;
}
public void setid(int id) {
this.id=id;
}
public String getname() {
return giao;
}
public void setName(String name) {
this.giao=name;
}
public String getsalary( ) {
return creator;
}
}
public class arry {
public static void main(String[] args){
Employee one = new Employee (1,"张三","5000.0");
Employee tow = new Employee(2,"李四","5500.0");
Employee three = new Employee (3,"赵六","4000.0");
ArrayList Employee = new ArrayList();
Employee.add(one);
Employee.add(tow);
Employee.add(three);
System.out.println("员工姓名 员工薪资" );
for (int i = 0; i<Employee.size(); i++){
Employee Title=(Employee )Employee .get(i);
System.out.println(Title.get_Id()+Title.getname()+" "+Title.getsalary());
}
}
}