贴上部分代码:
Map<String, Map<String, Integer>> fingerprint;
Map<String, Integer> in;
in = new HashMap();
fingerprint = new HashMap();
        in.put("1-TP-LINK_2348CC", -66);
        in.put("1-hit404", -70);
        in.put("1-441", -97);
        in.put("1-422", -100);
        fingerprint.put("new404", in);
//==================================================
        in.clear();
        in.put("2-TP-LINK_PocketAP_584322", -81);
        in.put("2-Connectify-xxxx", -85);
        in.put("2-441", -99);
        fingerprint.put("new410", in);上面是部分代码,调试过程中,当执行完===上面的部分时fingerprint中的内容还是正常的,为:
{new404={1-422=-100, 1-TP-LINK_2348CC=-66, 1-441=-97, 1-hit404=-70}}
但是再执行完====下面的语句时,fingerprint中的内容就变成这样了:
{new410={2-Connectify-xxxx=-85, 2-441=-99, 2-TP-LINK_PocketAP_584322=-81}, new404={2-Connectify-xxxx=-85, 2-441=-99, 2-TP-LINK_PocketAP_584322=-81}}我觉得很诧异阿,为什么会是这个结果,按理说结果应该是:
{new404={1-422=-100, 1-TP-LINK_2348CC=-66, 1-441=-97, 1-hit404=-70}, new404={2-Connectify-xxxx=-85, 2-441=-99, 2-TP-LINK_PocketAP_584322=-81}}
有哪位能给解释一下,我什么地方错了?