結果 : java replace the last character in a string