Reverses a string of text in java