Learn Java Programming - ArrayList clear() and clone() Tutorial

Publicado el: 19 octubre 2015
en el canal de: Daniel Ross
3,110
21

In this tutorial I will demonstrate how to use two methods in the ArrayList class. Both the .clear() and .clone() methods have no parameters in their parameter list. The .clear() method is self-documenting and it does just what you might expect ... it clears all the elements from the current instance of the ArrayList. The .clone() method may not work quite as expected - it does create a seperate copy of the ArrayList object with the same values as the original. However, it returns an Object type, and that means that none of the ArrayList methods can be called except for those inherited from the Object class. I'll explain in the source code.


En esta página del sitio puede ver el video en línea Learn Java Programming - ArrayList clear() and clone() Tutorial de Duración hora minuto segunda en buena calidad , que subió el usuario Daniel Ross 19 octubre 2015, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 3,110 veces y le gustó 21 a los espectadores. Disfruta viendo!