📅  最后修改于: 2022-03-11 14:52:41.115000             🧑  作者: Mango
// INPUT: "you shall not pass"
// OUTPUT: "pass not shall you"
String s[] = "you shall not pass".split(" ");
String ans = "";
for (int i = s.length - 1; i >= 0; i--) {
ans += s[i] + " ";
}
System.out.println(ans);