I do somewhat understand what an array is in the computer itself, I’m just sure not exactly sure how Java specifically represents them. I know that it is technically an object, but is it like a superset or a special type of class or something?
All classes extend Object and the class Object is like a special class, do arrays have the same idea since other collection classes (ArrayList, HashMap, HashSet, etc) use array so it’s some special (or default) type of iterable/collection/class?
And yes, to answer your uncertainty there is an
ArrayList in Java, which is just an abstraction of an array that when it fills up, a new array with 50% more size is created and the elements are copied over (and some other useful properties like getters, setters, etc). jdk8/jdk8/jdk: 687fd7c7986d src/share/classes/java/util/ArrayList.java. Note that not all dynamic arrays double their size- Java ArrayLists increase by 50% while Java vectors double their size once they are full
A ‘list’ is confusing like you said- I believe it refers to a dynamic array (and sometimes, like in the case of python but not java, the ability to hold heterogeneous elements). In Java, list is just an interface, and ArrayList, LinkedList, Vector and Stack (Stack extends Vector) implement it so it’s more of a ‘blueprint’