mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-06-16 18:10:13 +08:00
Merge pull request #1780 from Raxcl/patch-3
Update arraylist-source-code.md
This commit is contained in:
commit
f61996f464
@ -922,7 +922,6 @@ public class EnsureCapacityTest {
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
ArrayList<Object> list = new ArrayList<Object>();
|
ArrayList<Object> list = new ArrayList<Object>();
|
||||||
final int N = 10000000;
|
final int N = 10000000;
|
||||||
list = new ArrayList<Object>();
|
|
||||||
long startTime1 = System.currentTimeMillis();
|
long startTime1 = System.currentTimeMillis();
|
||||||
list.ensureCapacity(N);
|
list.ensureCapacity(N);
|
||||||
for (int i = 0; i < N; i++) {
|
for (int i = 0; i < N; i++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user