I work in Java and declared two maps as follows:
private Map<MyCustomClass, Integer> map1, map2; map1 = new HashMap<MyCustomClass, Integer>(); map2 = new HashMap<MyCustomClass, Integer>(); //adding some key value pair into map1 //adding some key value pair into map2 private ArrayList<MyCustomClass> list = new ArrayList<MyCustomClass>();
Now I want to insert the keys of both cards into the ArrayList declared above. Is there any built-in method for this or do I need to write some kind of custom code?
source share