Iterative Java solution to reversing words in a sentence.