So I have a basic hashmap with an arraylist:
Map<Text, ArrayList<Text>> map = new HashMap<Text, ArrayList<Text>>();
Say I have a key value pair: Key: Apple, Value: orange, red, blue
I already understand how to iterate through to print the key and it’s values like so: Apple, orange, red, blue
but is there a way to break up the values/iterate through the inner ArrayList and print the key/value pair three separate times/print the key with each value separately like:
Apple orange
Apple red
Apple blue