今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
The Collection interface
- [Instructor] Let's explore the design of the collection interface and take a glance at its methods. Since the collection interface is at the root of the interface hierarchy, that means the methods on it appear on every type that extends from it. So interfaces and concrete implementations of a list, set, and queue will inherit these common methods from the collection interface. Some collection methods are denoted as being optional, so they might appear on an implementation, but it's possible that a call to one of these methods will throw an unsupported operation exception. The interfaces in the collections framework and the collection interface itself are generic. So when we create a collection, we use a generic type argument to indicate the type of elements that it holds. The argument is declared by placing the type in angle brackets. Since the collection implementations are based on these interfaces, they use a…
内容
-
-
-
-
Interfaces6 分钟 58 秒
-
(已锁定)
Collection types2 分钟 52 秒
-
(已锁定)
The Collection interface2 分钟 4 秒
-
Collection methods4 分钟 24 秒
-
(已锁定)
Creating a collection5 分钟 4 秒
-
(已锁定)
Generic typing4 分钟 26 秒
-
(已锁定)
Object comparison2 分钟 19 秒
-
(已锁定)
The equals method6 分钟 40 秒
-
(已锁定)
Challenge: Adding and removing collection elements5 分钟 6 秒
-
(已锁定)
Challenge: Advanced collection problems6 分钟 48 秒
-
-
-
-
-
-
-
-