We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5e32ea commit df6e164Copy full SHA for df6e164
DataStructures/Stacks/StackArray.java
@@ -109,14 +109,13 @@ public int peek() {
109
}
110
111
private void resize(int newSize) {
112
- // private int[] transferArray = new int[newSize]; we can't put modifiers here !
113
int[] transferArray = new int[newSize];
114
115
- // for(int i = 0; i < stackArray.length(); i++){ the length isn't a method .
116
for (int i = 0; i < stackArray.length; i++) {
117
transferArray[i] = stackArray[i];
118
- stackArray = transferArray;
119
+ // This reference change might be nice in here
+ stackArray = transferArray;
120
maxSize = newSize;
121
122
0 commit comments