d2jsp
d2jsp Forums > Off-Topic > Programmer's Haven > Java, Visual Basic, VBScript > How Would I Do This?
Add Reply New Topic New Poll
ferf
Group: Member
Posts: 30,635
Joined: Mar 25 2009
Gold: 50.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!
JP99
Group: Member
Posts: 21,264
Joined: Sep 22 2007
Gold: 0.09
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?
ferf
Group: Member
Posts: 30,635
Joined: Mar 25 2009
Gold: 50.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 Java, Visual Basic, VBScript Topic List
Add Reply New Topic New Poll