commons-lang里StringUtils的实现
JDK中AbstractStringBuilder的实现
int i = 0;
int j = array.length - 1;
while (j > i) {
swap(array, i, j);
j--;
i++;
}
JDK中AbstractStringBuilder的实现
int n = array.length - 1;
for (int k = (n-1) >> 1; k >= 0; --k) {
swap(array, k, n-k);
}