题解 | Java #反转字符串#
反转字符串
http://www.nowcoder.com/practice/c3a6afee325e472386a1c4eb1ef987f3
public String solve (String str) {
// write code here
String ans = new String("");
for(int i = 0; i < str.length(); i++){
ans = str.charAt(i) + ans;
}
return ans;
}