I have two ArrayList of string and want to merge them into a single hashmap. I am doing something like this.
HashMap<ArrayList<String>,ArrayList<String>> map = new HashMap<ArrayList<String>, ArrayList<String>>();
ArrayList<String>k = receivedIntent.getStringArrayListExtra("keys");
ArrayList<String>v = receivedIntent.getStringArrayListExtra("values");
map.put(k, v);
Is this the right way? Ideally I want to access values in v array using values in k array as keys in the hashmap like value = map.get("Name"), where Name is one of the keys?