3 ms·
> E.g., correct usage of arrays vs. ArrayList. Arrays vs lists is a thing in all languages, not Java. They just have different names (list, vector, sequence...
by skneko 5y ago
> E.g., correct usage of arrays vs. ArrayList.
Arrays vs lists is a thing in all languages, not Java. They just have different names (list, vector, sequence...)
- kayodelycaon 5y agoI don’t think Ruby or Python have linked lists, only arrays.
- skneko 5y agoArrayList is not a linked list, it's an array-backed list like List in C# or other languages, like the name implies. Linked list is `java.util.LinkedList`.
- mattnewton 5y agoRuby and python only have an equivalent to Java’s “array list.” It’s not in the standard library, but you can trivially make linked list nodes yourself if the problem calls for it; I don’t remember encountering a need for the data structure over the built in array-list type outside of interview questions anyways.