I need to bounce an idea off someone to see if I am heading down the right direction with how I want to write a program. I need to read a .txt file , the file will have lines of data with each line containing the following :
student grade, student name , student ID . The .txt file has no set length so I am gong to use an ArrayList to store the data , problem that I am having is when I recover the data it's all in one array.
ex. [ 100, bob, 55555, 96, tim, 12345, 87, amy, 54321 ]
I need to break the ArrayList down so I can use the Collections.sort to sort the array date by name . so the result would look like:
amy 87 54321
bob 100 55555
tim 96 12345
This is where I need the help ...I was thinking about using a for loop to sort the data out , then apply the Collections.sort to it after my loop is complete. Would using a "For Loop" be going in the right directions with this ? Thank you for the help !