/**
* 将一个字符串进行反转
**/
private static String reverse(String str) {
char[] chars = new char[str.length()];
int len = str.length() - 1;
for (int i = 0; i < str.length(); i++) {
chars[i] = str.charAt(len - i);
}
return new String(chars);
}
/**
* 将一个字符串进行反转
**/
private static String reverse(String str) {
char[] chars = new char[str.length()];
int len = str.length() - 1;
for (int i = 0; i < str.length(); i++) {
chars[i] = str.charAt(len - i);
}
return new String(chars);
}