Learn Java Programming - ArrayList retainAll Method Tutorial

Publicado em: 30 Novembro 2015
no canal de: Daniel Ross
2,377
8

The retainAll method retains all matching elements in the current ArrayList instance that match all elements from the derived Collection list argument. The Collection portion of the parameter list means that we can pass in any object that is a subclass or subinterface of the Collection interface. The Collection interface lays the ground work for the Collection Framework. The Collection interface defines many essential abstract methods such as add(), clear(), and of course retainAll(). Each and every subclass or subinterface will inherit these methods and any concrete subclass must implement them. So now we know that a collection must contain a group of elements (objects) and hence why we can pass an object instance that is derived from the Collection interface.


Nesta página do site você pode assistir ao vídeo on-line Learn Java Programming - ArrayList retainAll Method Tutorial duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Daniel Ross 30 Novembro 2015, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 2,377 vezes e gostou 8 espectadores. Boa visualização!