結果 : write a function to reverse a string in java