Check out example codes for "put arraylist in hashtable java". It will help you in understanding the concepts better.

Code Example 1

List<String> newList = new ArrayList<String>();
      newList.addAll(neighb);
      data.put(words.get(i), newList);
      newList.clear();

Learn ReactJs, React Native from akashmittal.com