I need to write a method that loops through ArrayList<String> pathClientStatic and then copies certain elements to a String[].

pathClientStatic is an ArrayList containing a string of timestamp x y

Each is seperated by a space " ", and there will always be a tuple though the number of tuples varies with how long the path is. So there may be timestamp x y timestamp x y timestamp x y or simply timestamp x y.

If there is more than a pair of tuples in the ArrayList, ie timestamp x y timestamp x y what I want is to copy x y x y of the final pair of tuples in the array, so the very last x y and the penultimate x y, out and into the String[]. At the moment I have the code below;