重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

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://cqcxhl.cn/article/gcchio.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP