import java.util.Scanner;
public class Test2 {
public void reverse(String str) {
String[] wordArray = str.split(" ");
System.out.print("颠倒输出:");
for (int i = wordArray.length - 1; i >= 0; i--) {
System.out.print(wordArray[i] + " ");
}
}
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("请输入一句英语句子:");
String str = input.nextLine();
Test test = new Test();
test.reverse(str);
}
}