今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
The Collection interface
- [Instructor] Most data structures in Java implements the collection interface. So if you've ever even created a simple list, then you've probably used the classes that implement collection. There are several other interfaces that sits underneath this. So things like list, queue, and set all extends the collection interface. And since Java 21, there's also a new one called sequenced collection. And this provides a more uniform way of getting the first and last elements in the collection. And then there are all the concrete classes that sits underneath these that implements these interfaces. So for example, a realist implements the list interface, which extends the collection interface and PriorityQueue implements queue and HashSet implements set. These are just a couple of examples. There are actually lots more interfaces that extend collection and lots more classes that implements those interfaces. You might hear…