December 2013
Intermediate to advanced
448 pages
13h 44m
English
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
3. isEmpty—Returns 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 ...