Java's "ArrayList" seems like a contradiction to me. An array (static or dynamic) is certainly nothing like a list in a language like c++ or in computer science. What inherits from Java's List and yet seems to be nothing like one is rather silly.
Questions:
- What is the abstract data type of the
ArrayList? Is it a vector (dynamic array), or is it a linked list? - Why was the name
ArrayListchosen? Why was the nameListchosen for something that uses indexes to access elements and is sometimes random access (see here)?
NB: I come from a c++ background where a list is a linked list and vector is a vector (self-adjusting dynamic array). Is this terminology different in other languages?
Listinterface that is based on arrays. Therefore, it's anArrayList.