您好,登錄后才能下訂單哦!
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;
}
}
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。