...
/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.
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 ...