1

我打算抛出 Java 集合信息。我遇到了 ArrayList 是基于索引的数据结构的术语。它的意义是什么?我对此感到困惑?这是否意味着它存储带有索引的元素/对象。

4

1 回答 1

0

ArrayList is part of java collection frame work. Since ArrayLis is an index based data-structure searching or getting element from Array with index is pretty fast. Array provides O(1) performance for get(index) method but remove is costly in ArrayList as you need to rearrange all elements.

For more help on Java collection framework read below book

Java Collection

于 2013-01-10T09:29:45.537 回答