java 对于Map<String,Map<String,Integer>>可以通过赋予得到里面的map吗?
展开全部
Of course you can.
//=================================
Map<String, Integer> innerMap = new HashMap<String, Integer>();
innerMap.put("innerKey", 2014);
Map<String, Map<String,Integer>> map = new HashMap<String, Map<String, Integer>>();
map.put("outerKey", innerMap);
Map<String, Integer> targetMap = map.get("outerKey");
if(targetMap == innerMap){
System.out.println("You got the inner Map, and it is saved in targetMap!!!");
}
//=================================
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询