Java Interview Shorts 11 - [Java 8] New method of Map interface - putIfAbsent | #javainterview

preview_player
Показать описание
In this video we will learn about a new method of Map interface called putIfAbsent. This method will only add the entry to the map if the given key is not present else it's just ignore the key.

As Java Map is an important interface, we should aware about this java 8 new feature.
Рекомендации по теме
Комментарии
Автор

Python guys are really smart, they added all kinds of methods in start only, but java is adding slowly and making hard for Java developer interviews

artinmayur
Автор

Great Explanation.. I am just trying to understand when we already have put method to add an entry.. why to even go for putIfPresent() ?

Is there any other specific reason for it?

tejamanu
Автор

What does it do is it like default one what will run if no other entry matches?? Then it will spit this thing out

LifeExperimentalist
Автор

And here we are discussing java 8 apis😂 java 8 is ANCIENT by now... please use something newer!

Mig
join shbcf.ru