From the course: Java 8+ Essential Training: Objects and APIs

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Manage resizable arrays with List

Manage resizable arrays with List - Java Tutorial

From the course: Java 8+ Essential Training: Objects and APIs

Start my 1-month free trial

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…

Contents