Reading txt file contents into parallel arrays
I have been trying to read data from text files in java into parallel arrays but haven't had any success yet. The format of the contents on my txt file is as follows:
(Note: the line 1, line 2 etc. is not actually in the txt file)
Line 1: Stringwith064numbers
Line 2: String with more than one word
Line 3 (int): 4
Line 4: Stringwith455numbers
Line 5: String with more than one word again
Line 6 (another int): 65
It's a pattern of three lines per entry. I have three arrays (two string and one int) and I want to get the correct values into the arrays.
I have been reading online and trying different things but can't get it functioning.
Any guidance appreciated.