HashMap集合键是Student值是String的案例
来源:互联网 发布:编程有什么用 编辑:程序博客网 时间:2024/05/17 22:42
/*
* 集合框架(HashMap集合键是Student值是String的案例) A:案例演示
* HashMap集合键是Student值是String的案例
* 键是学生对象,代表每一个学生
* 值是字符串对象,代表归属地
*
*/
HashMap<Student, String> hm =new HashMap<>();
hm.put(new Student("张三",23),"上海" );
hm.put(new Student("张三",23),"北京" );
hm.put(new Student("王五",23),"南京" );
hm.put(new Student("赵六",23),"无锡" );
System.out.println(hm);
* 集合框架(HashMap集合键是Student值是String的案例) A:案例演示
* HashMap集合键是Student值是String的案例
* 键是学生对象,代表每一个学生
* 值是字符串对象,代表归属地
*
*/
HashMap<Student, String> hm =new HashMap<>();
hm.put(new Student("张三",23),"上海" );
hm.put(new Student("张三",23),"北京" );
hm.put(new Student("王五",23),"南京" );
hm.put(new Student("赵六",23),"无锡" );
System.out.println(hm);
阅读全文
0 0
- HashMap集合键是Student值是String的案例
- TreeMap集合键是Student值是String的案例
- 集合框架_HashMap集合键是String值是Student的案例
- 集合框架_HashMap集合键是Student值是String的案例
- 集合框架_TreeMap集合键是Student值是String的案例
- Java_基础—TreeMap集合键是Student值是String的案例
- 集合框架_TreeMap集合键是String值是String的案例
- 集合框架_HashMap集合键是Stirng值是String的案例
- 集合框架_HashMap集合键是Integer值是String的案例
- HashMap是无序的
- HashMap是无序的
- struct 后面的 student 是结构标记
- 集合框架-HashMap集合的案例
- HashMap的key是对象
- HashMap是如何来的
- 集合框架_HashMap集合嵌套HashMap集合的案例
- 集合框架_ArrayList集合嵌套HashMap集合的案例
- JavaScript对象是“键-值”对的集合
- [leetcode]40. Combination Sum II(Java)
- HeadFirstPython---------(五)第七章(Web开发__集成在一起)
- CountDownTimer使用之页面即时跳转
- 离散基础 (15). 调和级数分析
- Math
- HashMap集合键是Student值是String的案例
- Python图像批处理(图像非监督分类)
- Spring3:AOP
- heade头r
- 微生物测序分析LEfSe
- 异常点检测算法(一)概率统计
- 个人新的博客地址
- Java 8新特性探究(五)Base64详解
- leetcode8 atoi