I have an ArrayList of HashMaps in Java and I want to append it to another similar list, Is there any way to do it so that the resulting array list retains the order.
for e.g.:
List<Map<String, String>> list1 = new ArrayList<HashMap<String, String>>();
List<Map<String, String>> list1 = new ArrayList<HashMap<String, String>>();
list1.add(hm1);
list1.add(hm2);
list1.add(hm3);
list2.add(hm4);
list2.add(hm5);
list2.add(hm6);
The new List that I want is:
//list 3 = list1 + list2;
list3 = {hm1, hm2, hm3, hm4, hm5, hm6};
How to do that?