I am using the HashMap class and it looks like this:
HashMap<String, ArrayList<String>> fileRank = new HashMap<String, ArrayList<String>>();
I am wondering how to add a new line to an Arraylist after the initial input.
fileRank.put(word, file1);
I would like to add file2 after file1 to the key: the word above.
source share