August 2018
Intermediate to advanced
380 pages
10h 2m
English
Let's have a look at how collections are understood within the framework of an imperative programming language, while also looking at Java's abstraction of a list. Its API documentation is available at https://docs.oracle.com/javase/8/docs/api/java/util/List.html. This interface only has a limited number of methods defined. The first thing that we need to pay attention to here is mutability. Immediately, we see methods such as add and remove. This implies that this interface is supposed to be implemented by a mutable collection that is supposed to implement the operations that add or remove data from it. You should be aware that methods can throw an UnsupportedOperationException, which means that certain collections ...