String str = "Jobs related to the computer and communications " +
"industry is becoming big hits recently. Since a lot of " +
"things have turned digital, a lot of companies are " +
"looking for professionals who are familiar with computer " +
"and internet know-how. This was amplified further by the " +
"emergence of web services which are part of the backbone " +
"of the worlds business processing outsourcing (BPO) industry. " +
"If you are applying for a position involved in web services, " +
"it will not be an easy task because you will be competing with " +
"only the real professional in the field.";
showWordFrequency(str);
}
private static void showWordFrequency(String str) {
List<String> words = getWords(str);
Map<String, Integer> frequnecy = new HashMap<String, Integer>();
for (String word : words) { if (!frequnecy.containsKey(word)) {
frequnecy.put(word, 1);
} else {
frequnecy.put(word, frequnecy.get(word) + 1);
}
}