I got a txt file and I'm using java.io.File
in my code. I want to read the txt of each line, each line can have more than one word.
23
10
23
C34
Crew Quarters
1
1
4
false
I got a txt file and I'm using java.io.File
in my code. I want to read the txt of each line, each line can have more than one word.
23
10
23
C34
Crew Quarters
1
1
4
false
Use loop then read all lines.
for (String line : Files.readAllLines(Paths.get("/path/to/file.txt"))) {
// ...
}