Learn Java Programming - ArrayList retainAll Method Tutorial

Veröffentlicht am: 30 November 2015
auf dem Kanal: 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.


Auf dieser Seite können Sie das Online-Video Learn Java Programming - ArrayList retainAll Method Tutorial mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Daniel Ross 30 November 2015 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 2,377 Mal angesehen und es wurde von 8 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!