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
文章位置:http://www.csruizhi.cn/article/gcchio.html

其他资讯

Copyright © 2007-2024 成都优众联杰科技有限公司 All Rights Reserved 蜀ICP备2024116266号
友情链接: 高端网站设计推广 成都网站设计 成都做网站建设公司 重庆网站建设 网站制作报价 成都网站设计 成都网站制作 成都网站设计 成都网站制作 成都网站建设 网站设计公司 成都响应式网站建设 成都网站建设 自适应网站建设 企业网站建设 成都网站建设 成都网站制作 网站制作公司 温江网站设计 响应式网站设计方案 营销网站建设 手机网站制作