Amazon interview question

Write a java program to calculate the frequency of the online series data.