結果 : how to reverse a word in java using for loop