当前位置:网站首页>map去重代码实现
map去重代码实现
2022-08-09 09:17:00 【我是不贪嘴吖】
对map去重的了解
代码实现
public static void main(String[] arg){
Map<String,String> map = new HashMap<>();
map.put("11","22");
map.put("22","22");
map.put("33","33");
map.put("44","44");
System.out.println("去重前" + map.toString());
Map<String,String> map1 = new HashMap(String,String);
for(String key :map.get(key)){
if(!map1.containsValue(map.get(key)){
map1.put(key,map.get(key));
}
System.out.println("去重后" + map1.toString());
边栏推荐
猜你喜欢
一篇文章让你彻底搞懂关于性能测试常见术语的定义

学习栈的心得和总结(数组实现)

Django实现对数据库数据增删改查(一)

MySQL transaction isolation

手机APP测试流程规范和方法你知道多少?

div模拟textarea文本框,输入文字高度自适应,且实现字数统计和限制
自动化测试简历编写应该注意哪方面?有哪些技巧?

MySQL索引

JS报错-Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on...

使用Protege4和CO-ODE工具构建OWL本体的实用指南-1.3版本(4.Building An OWL Ontology)
随机推荐
接口测试的概念、目的、流程、测试方法有哪些?
Anaconda4.8.3介绍、安装及使用教程安装(win10)并修改Jupyter默认工作目录
高清卫星地图浏览器
SQL server中的数据类型
shell 定时监控并处理脚本
年薪40W测试工程师成长之路,你在哪个阶段?
Consolidation of Questionnaire Questions and Answers
Domestic Google earth, terrain analysis seconds kill with the map software
软件测试面试常见问题及答案(发散思维、接口、性能、概念、)
Jfinal loading configuration file principle
MySQL Leak Detection and Filling (3) Calculated Fields
verilog独热码实现译码MIPS指令集
对于栈、递归的关系的理解
The era of Google Maps is over, how to view high-definition satellite image maps?
MySQL锁
功能自动化测试实施的原则以及方法有哪些?
编程memonic chant、trick
这12个GIS软件一个比一个好用
教你如何免费获取0.1米高精度卫星地图
二叉树的遍历(非递归)