hashmap 和 arraylist的简单运用
1、hashmap集合的简单运用:
**System.out.println("hashmap的运用:");
Map hashmap=new HashMap();
hashmap.put(1, "1");
//把字符串放进map,前面是int类型,是该对象的位置,后面是对象的类型
hashmap.put(2, "2");
hashmap.put(3, "3");
hashmap.put(4, "4");
String value = null;
for (in
原创
2021-04-17 14:31:16 ·
246 阅读 ·
0 评论