You already have that freq variable in your word class, and i don‘t think you use it, other than to Print it.
Why not increment that every time you add that word to your wordcount?
Also, why is your find() method commented out?
You already have that freq variable in your word class, and i don‘t think you use it, other than to Print it.
Why not increment that every time you add that word to your wordcount?
Also, why is your find() method commented out?