最佳答案
当我在 Java 中执行 System.out.println(map)
时,我在 stdout 中得到一个很好的输出。如何在不干预标准输出的情况下获得变量中 Map
的相同字符串表示?像是 String mapAsString = Collections.toString(map)
?