use hashmap
like this:
Map occurrencies = new HashMap();
for (String word : list) {
occurrencies.put(word, occurrencies.containsKey(word)
? occurrencies.get(word) + 1 : 1);
}
for (Entry entry : occurrencies.entrySet()) {
System.out.println("Word: "+entry.getKey()
+ ", occurences: "+entry.getValue());
}