课程: Java 8+ Essential Training: Objects and APIs
今天就学习课程吧!
今天就开通帐号,24,600 门业界名师课程任您挑!
Manage resizable arrays with List - Java教程
课程: Java 8+ Essential Training: Objects and APIs
Manage resizable arrays with List
- [Instructor] The Java Collections framework is a set of interfaces and classes that make it easy to manage data collections in your applications. You can manage either ordered or unordered data, and you can use one of four categories of classes. Each of these categories is represented by an interface. On this page they're shown in the far left column, and they're named Set, List, Deque, and Map. And then across the top you'll see the different types of collections within the categories. So for example, let's say you wanted to create a list. A list is ordered data. And you wanted it to be resizable. You might then select the ArrayList class. Now when you declare a collection object it's traditional to set the type of the collection as the interface. And then when you instantiate the object you use a constructor method for the concrete class that you want to use. So let's start in this project where the main method is empty, but I have a single object called clothing item. I'm going…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。