单词翻转
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String sentence = scanner.nextLine();
String[] words = sentence.split(" ");
for (String word : words) {
StringBuilder reversedWord = new StringBuilder(word).reverse();
System.out.println(reversedWord);
}
}
}