0
/ 1.0
Problem Description
Write a method buildMap() that receives an ArrayList<String> of words and returns a HashMap with all the words...
Write a method buildMap() that receives an ArrayList<String> of words and
returns a HashMap with all the words in the array list stored in a
HashMap<String, Integer> where the key of the hashmap is the word
from the input array and the value is the number of times that word appears
in the array.
public HashMap<String, Integer> buildMap(ArrayList<String> words)
You must use a HashMap<String, Integer> to:
words.words is never null, but might have 0 values.words array list contains a string. The elements are never null.Your feedback will appear here when you check your answer.