2
Doubts about the methods replace : compute : computeIfAbsent : computeIfPresent :forEach(briefly all who make use of the function or biFuntion within the input parameter)
- The
replaceis it really necessary? this is me whenever I wanted to replace aValueof aKeyI was doing theput, as the key was the same map itself replaced. With this implementation I may have problems? forEachI know it serves to go through the map doing actions but how I implement the input parameter(according to the documentationBiConsumer<? super K,? super V> action) may pass an example?- The
compute:computeIfAbsent:computeIfPresentI couldn’t figure out what they serve to give an example of use?