Skip to content

Commit

Permalink
correct a mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
CarpenterLee committed Jun 1, 2016
1 parent a7cb381 commit 6efa360
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion markdown/2-ArrayList.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public E get(int index) {
```java
private void grow(int minCapacity) {
int oldCapacity = elementData.length;
int newCapacity = oldCapacity + (oldCapacity >> 1);//原来的3倍
int newCapacity = oldCapacity + (oldCapacity >> 1);//原来的1.5倍
if (newCapacity - minCapacity < 0)
newCapacity = minCapacity;
if (newCapacity - MAX_ARRAY_SIZE > 0)
Expand Down

0 comments on commit 6efa360

Please sign in to comment.