List list = new ArrayList(); list.add();
Map map=new HashMap(); map.put();
Map map=new HashMap(); map.put();
本文通过示例介绍了如何在Java中使用ArrayList和HashMap两种基本的数据结构。示例中展示了如何创建一个空的ArrayList并添加元素,以及如何初始化一个HashMap并设置键值对。
25万+
2174

被折叠的 条评论
为什么被折叠?