Read a Text File
From Progzoo
Top Ten Tips
Read Text File
You can open a text file and read each line.
- The
BufferedReaderrepresents a text file. - You can create
BufferedReaderfrom an
FileReader.
- The while condition
(s=fh.readLine())!=nulldoes two
things, it assigns the string s and it checks for null.
The text file [haggis.txt] includes some lines of text.
[Font]
[Default]
[Show]
[Resize]