题解 | #反转字符串#
import java.util.*;
public class Solution {
/**
* 反转字符串
* @param str string字符串
* @return string字符串
*/
public String solve (String str) {
// write code here
return new StringBuilder(str).reverse().toString();
}
}
查看15道真题和解析