HashMap通过一个方法,为何值不变
main () {
Map<String, List<String>> map = new HashMap();
this.getDataInfo(map);
sout(map);
}
static void getDataInfo(Map<String, List<String>> map) {
// 一系列操作得到map的数据
// 通过debug查看,map已经获得到数据了
}
问题:
为何在sout打印到控制台,得到的还是空的数据呢?
回答

输出正常, 贴一下具体代码