Array is a location in the memory where a set of items with the same type are stored under 1 name
Advantages of Array
- You can have a single location / name for large amounts of data
- Individual items may still be accessed
- Operations on entire data group can be carried out easily
3 steps to use an array
- Create array (array declarization)
- Give array a size
- Setting values of the array elements
int[] studentAges = new int[]{16, 17, 15, 17}
initializer list
to access elements refer to their position
studentAges[0] returns 16 studentAges[3] returns 17