Last active
November 2, 2016 14:54
-
-
Save christherama/ec929d1384d6f2e50d98fc637b2df715 to your computer and use it in GitHub Desktop.
An empty ArrayList is created
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ArrayList<E> { | |
transient Object[] elementData; // (1) | |
private static final Object[] EMPTY_ELEMENTDATA = {}; // (3) | |
public ArrayList() { | |
super(); | |
this.elementData = EMPTY_ELEMENTDATA; // (2) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment