题解 | #句子逆序#
句子逆序
http://www.nowcoder.com/practice/48b3cb4e3c694d9da5526e6255bb73c3
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
String str = scanner.nextLine();
String[] strs = str.split(" ");
for(int i = strs.length-1; i>=0;i--){
if(i!=0)
System.out.print(strs[i]+" ");
else
System.out.print(strs[i]);
}
}
}