March 2019
Beginner to intermediate
182 pages
4h 6m
English
We saw how immutability affects the creation and design of programs, so now we will understand how it is useful.
In this section, we will cover the following topics:
Let's first understand the cause of mutable collections. To do this, we will be creating two threads that simultaneously modify the mutable collection. We will be using this code for our test. First, we will create a ListBuffer that is a mutable list. Then, we can add and delete links without creating another list for any modification. We can then create an Executors service with two threads. ...
Read now
Unlock full access