javaMap接口2
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 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;
}
}
成都创新互联公司主营宕昌网站建设的网络公司,主营网站建设方案,app软件开发公司,宕昌h5成都微信小程序搭建,宕昌网站营销推广欢迎宕昌等地区企业咨询
网站题目:javaMap接口2
本文URL:http://scgulin.cn/article/gcchio.html