List interface
In this chapter you will learn:
- What is Java List interface
List
List
defines an ordered collection.
This interface is a member of the Java Collections Framework.
We can control where in the list each element is inserted.
The position each element in the list has is called index.
We can access elements by their index.
Lists like Java arrays are zero index based.
Unlike sets, lists typically allow duplicate elements.
List interface has the following definition.
public interface List<E>
extends Collection<E>
Next chapter...
What you will learn in the next chapter:
- How to add element to a List