Java tutorial
//package com.java2s; import java.util.Map; public class Main { public static <V> void appendMaps(Map<Integer, V> A, Map<Integer, V> B) { int index = A.size(); for (int i : B.keySet()) { A.put(index, B.get(i)); index++; } } }