map的本质
Map<String, String> map = new HashMap<String, String>(); map.put("1", "value1"); map.put("2", "value2"); map.put("3", "value3"); String[] array_num = ["1","2","3"]; String[] array_value= ["value1","value2","value3"]; map.get("1") == array_value[array_num.indexOf("1")]; map.get("2") == array_value[array_num.indexOf("2")]; map.get("3") == array_value[array_num.indexOf("3")];
通过上面可以发现 单层map的本质其实是两个序列化的数组, 多层map同理