Skip to main content

Section 3.1 Standard Java Classes

As with any established language, there is a large set of functionality provided by the language via its standard library. This is especially true for Java. We will focus for now solely on a small part of that library, namely some of the key collection classes that are part of the java.util
 1 
docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/package-summary.html
package.
In particular, we will take a closer look at the List and Map interfaces and their standard implementations.
We will discuss the importance of the difference between interface and implementation at a later time.
For now, just keep in mind the different use cases for these two important classes:
  • Lists are used for a collection of items that are in some order, and will typically be iterated over in a loop.
  • Maps are used to store key-value pairs, where the most common operation is to find or update the value associated with a particular key.

Checkpoint 3.1.1.

Checkpoint 3.1.2.