Arrays and collections are a family of data types that contain a sequence of values. It includes Lists and Arrays, Sets, and Maps. This subsection covers each of the three types and describes how to create them and perform some basic operations. Each collection type is different, but there are four methods you can invoke on all of them:
1. clear—Removes all elements from the collection
2. clone—Returns a copy of the collection
false if the collection has elements,
true if empty
4. size—Returns the number of elements in the collection as an Integer
Lists and Arrays contain an ordered sequence of values, all the same type. Duplicate values are allowed. Unlike Lists, the length of an Array ...