This is horrible as its O(N) insertion (we have to slide the array down each time).  Instead use either a LinkedList, or append to the array and then use Collections.reverse() to flip it around after the walk is complete.