Domanda di colloquio di M3 Consulting

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