Arrays or array lists are used when we have a collection of the same types of objects and we want to hold them. Both arrays and array lists have super-fast random access because of using index's.
Using and Creating Lists For an ArrayList to be used, it first needs be imported into the program. This is achieved by including the command import java.util.ArrayList; at the top of the program.