您好,登錄后才能下訂單哦!
public static void main(String[] args)
{
em e1=new em(1,"me",100);
em e2=new em(2,"she",1000);
em e3=new em(3,"he",10000);
Map<Integer,em> map=new HashMap<>();
map.put(10, e1);
map.put(11, e2);
map.put(13, e3);
em e5=map.get(11);
}
}
em(int id,String name,double salary)
{
this.id=id;
this.name=name;
this.salary=salary;
}
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 double getSalary() {
return salary;
}
public void setSalary(double salary) {
this.salary = salary;
}
}
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。