MainTest.java
593 Bytes
package cn.com.glsx.kafka.queue.remote;
import cn.hutool.json.JSONUtil;
import java.util.concurrent.ConcurrentHashMap;
/**
* @author Yanglinlong
* @date 2021/12/27 10:39
*/
public class MainTest {
public static void main(String[] args) {
ConcurrentHashMap<String, String> hashMap = new ConcurrentHashMap<>();
hashMap.put("123", "123");
hashMap.put("123", "456");
hashMap.put("789", "456");
System.out.println("hashMap = " + JSONUtil.toJsonStr(hashMap));
System.out.println("hashMap = " + JSONUtil.toJsonStr(hashMap.values()));
}
}