In Java you can use an array to group primitives or objects of the same type. The entities belonging to an array is called the elements or components of the array. In this chapter you will learn how to create, initialize and iterate over an array as well as manipulate its elements. This chapter also features the java.util.Arrays and java.util.ArrayList classes.
In the background, every time you create an array, the compiler creates an object which allows you to:
▪ get the number of elements in the array through the length field. The length or size of an array is the number of elements in it.
▪ access each element by specifying an index. This indexing is zero-based. Index 0 refers to the first element, ...