HI guys, I have a text File that Contain Names Starting with the surname and then the First Name. I would Like to read them In a reverse order Starting with the First Name and the Second name. The code I have reads them in the order which they are printed on the text file. For Example
I have the Name:
I want the output to be:
The code I have is:
Give a beggar a fish; feed him for a day. Teach him how to fish; Feed him for a lifetime.
Its not quite difficult as it might sound.
As you already know, array elements can be accessed using the index like
So when you split the read line you get the last name and first name. Just access it as first name(index) and last name(index)