結果 : first and last character of string java