引用:Default initial capacity of ArrayDeque is 16. It will increase at a power of 2 (24, 25, 26 and so on) when size exceeds capacity.
这是否意味着它的行为类似于ArrayList
?每次大小超过容量时,都会将旧元素复制到新数组中?我可以说ArrayDequeue
and ArrayList
is array的内部实现(正如他们的名字所说)吗?只是调整大小不同?