java map类型转换成string类型

Map<String, String> map = new HashMap<String, String>();
map.put("key1", "value1");
map.put("key2", "value2");
map.put("key3", "value3");
System.out.println(map.toString());

执行结果:

{key1=value1, key2=value2, key3=value3}

 



posted @ 2023-01-19 15:03  锐洋智能  阅读(1050)  评论(0编辑  收藏  举报