HSBC Interview Question

Count number of occurrence of words using map in java