...
/Map API Improvements: Replace Operations
Map API Improvements: Replace Operations
This lessons explains the new methods for replacing the values that have been added to Map API.
We'll cover the following...
We'll cover the following...
In the previous lesson, we discussed a few new methods that have been added to the Map interface. In this lesson, we will look at some more improvements that have been done in Map API.
1. replace()
, replaceAll()
, and remove()
Sometimes we are required to change certain values from Hashmap
. Before Java 8, the only way to do this was to iterate over the Map
and change each value one by one. ...