class="java" name="code"> /** * @Description: 将给定字符串倒序 * @param sourceString 源字符串 * @return String */ public String inverteString(String sourceString) { StringBuffer temp = new StringBuffer(sourceString); return temp.reverse().toString(); }