Pergunta de entrevista da empresa M3 Consulting

How would you go about counting all the different words in a book using Java