题解 | #字符逆序#
字符逆序
http://www.nowcoder.com/practice/cc57022cb4194697ac30bcb566aeb47b
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String s = in.nextLine();
String[] sr = s.split(" ");
StringBuilder[] sb = new StringBuilder[sr.length];
for(int i = 0; i<sr.length; i++){
sb[i] = new StringBuilder(sr[i]);
}
for(int j = 0; j<sr.length; j++){
System.out.print(sb[sr.length-1-j].reverse().toString()+" ");
}
}
}