Beginner Java programmer here. I have searched for a while on the interwebs without much success.
I need to read in a text file and store each line into a string array. However I do not know how big the text file will be thus I was trying to figure out a easy way to dynamically allocate the size of the string array. I didn't know if there was a handy tool already in the Java library I could use. I was thinking maybe counting the total # of lines in the file first, then allocating the string array, but I also didn't know the best way to do that.
Thank you for any input!