public static void main(String[] args) { Map m = new HashMap(); for (int i = 0; i < 7; i++) { Map map = new HashMap(); map.put(i, i); m.put(i, map); } Map map = (Map) m.get(0); System.out.println( map.get(0));} 转载于:https://www.cnblogs.com/zzl0916/p/11141506.html