鈴聲C/C++linux服務(wù)器開(kāi)發(fā)/高級(jí)架構(gòu)師2004期/2101期/2109期
rivate void ensureCapacityInternal(int minCapacity) {
? ?// 使用無(wú)參構(gòu)造器初始化時(shí),指定擴(kuò)容為 10
? ?if (elementData == DEFAULTCAPACITY_EMPTY_ELEMENTDATA) {
? ? ? ?minCapacity = ?Math.max(DEFAULT_CAPACITY, minCapacity);
? ?}
? ?ensureExplicitCapacity(minCapacity);}private void ensureExplicitCapacity(int minCapacity) {
? ?modCount++;
標(biāo)簽: