摘要: public static void main(String[] args) { HashSet set = new HashSet<>(); //添加元素 set.add("hao"); set.add("shuai"); //删除元素 set.remove("hao"); //判断是否包含某元素 阅读全文
posted @ 2023-10-01 17:49 顺风顺水heng 阅读(35) 评论(0) 推荐(0)
摘要: 示例如下 public static void main(String[] args) { HashMap<String,Integer> map = new HashMap<>(); //添加元素 map.put("a",1); map.put("b",2); map.put("c",3); Sy 阅读全文
posted @ 2023-10-01 17:12 顺风顺水heng 阅读(29) 评论(0) 推荐(0)