📅  最后修改于: 2022-03-11 14:55:48.742000             🧑  作者: Mango
public static void reverse(String[] arr){
Stack stack = new Stack();
for(int i = 0; i < arr.length; i++) {
stack.push(arr[i]);
}
for(int i = 0; i < arr.length; i++) {
arr[i] = stack.top();
stack.pop();
}
return;
}