Reversing a Sentence in Java