Jump to content


eastar

Member Since 21 May 2015
Offline Last Active Aug 04 2019 11:51 AM
-----

Topics I've Started

Reading and writing files

29 June 2019 - 11:57 AM

Hello!

I don't know how to read from files effectively.
I have used the fh.readLine() function before, but since I didn't have much data to read from I used it a lame way:
Spoiler

As you can see in the readFile() function I use fh.readLine twice in a row. Now I would like to make a program, that reads in more data (probably 10 lines) from a file. I wouldn't like to use ten fh.readLine in a row.
I'm kinda sure that there is an easer, more elegant way of reading data, but how?

Thank you for the help!

eastar