From the course: Learning Java Collections
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
List interface - Java Tutorial
From the course: Learning Java Collections
List interface
- [Instructor] The List interface and its implementations are the next group of collections that we'll explore. Within this group, we'll find some of the most frequently used classes in Java, like an ArrayList and a LinkedList. Lists are very helpful because they allow us to store an ordered group of the elements and provide a set of methods for working with those elements by their position in the structure using random access. An elements position is specified by using a zero-based index, which is similar to how we work with an array. On the type hierarchy of the list, there are four basic implementations. Most Java developers consider the Vector and Stack types that came before collections to be obsolete. So we'll only dive deeper into the ArrayList and the LinkedList implementations. In this type hierarchy, you'll notice some crossover between the LinkedList and the hierarchy of the Queue interface. That's because…