class Solution {
public void reverseString(char[] s) {
int firstIndex = 0;
int lastIndex = s.length - 1;
while (firstIndex < lastIndex) {
//替换
char temp = s[firstIndex];
s[firstIndex] = s[lastIndex];
s[lastIndex] = temp;
firstIndex ++;
lastIndex --;
}
}
}