java中Map判断一个Map是否包含另一个Map

废话不多说,直接上代码

		Map<String,String> testMap=new HashMap<>();
        testMap.put("a1","1");
        testMap.put("a2","2");
        testMap.put("a3","3");
        testMap.put("a4","4");
        testMap.put("a5","5");
        testMap.put("a6","6");
        Map<String,String> testMap1=new HashMap<>();
        testMap1.put("a3","3");
        testMap.put("a4","4");
        testMap1.put("a1","1");
        testMap1.put("a2","2");
        System.out.println("Map比较");
        System.out.println(testMap.entrySet().containsAll(testMap1.entrySet()));