filmov
tv
Java concurrency example -- Load the ark with multithreading part 4

Показать описание
In this video, we first use debugger to show that the loadedAnimals can have duplicates. We prevent duplicate elements in loadedAnimals by overriding the equals and hashCode method in AnimalPair. Later we try another fix by preventing the calling code the have duplicates in candidate collections.