結果 : write a java code to reverse a string while preserving the whitespace