結果 : reverse a string without using predefined function in java