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.
On this page of the site you can watch the video online Learn Java Programming - ArrayList clear() and clone() Tutorial with a duration of hours minute second in good quality, which was uploaded by the user Daniel Ross 19 October 2015, share the link with friends and acquaintances, this video has already been watched 3,110 times on youtube and it was liked by 21 viewers. Enjoy your viewing!