I have a text file that is reading in Names and Ages printed on the same lines in that order
Example from .txt file:
Matt 25
Bob 19
Steve 30
How can I split the names and the ages so that I can sort the array by ages?
I have heard to use line.split("+")
but I am new to java and am unsure of how to implement this.