d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > How Would I Do This?
Add Reply New Topic New Poll
Member
Posts: 31,371
Joined: Mar 25 2009
Gold: 15.00
Jan 3 2021 07:55pm
So i wanna read a text file for the most common word? and display how many times it was used....
BUT i don't wanna do it line for line, i wanna do the entire text file, then figure it out

I did this also in line for line using hashmap, but now i wanna do it with the entire file rather then line for line, hopefully this makes sense!
Member
Posts: 24,497
Joined: Sep 22 2007
Gold: 50.69
Jan 4 2021 07:34pm
This seems like an obvious answer but without original code idk, but instead of reading to EOL in loop, just read until EOF?
Member
Posts: 31,371
Joined: Mar 25 2009
Gold: 15.00
Jan 4 2021 09:47pm
Quote (JP99 @ Jan 4 2021 09:34pm)
This seems like an obvious answer but without original code idk, but instead of reading to EOL in loop, just read until EOF?


Ah yes that'd make sense, ty!
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll