We will learn to declare, initialize, and access array elements with the help of examples. An array is a collection of similar types of data . For example, if we want to store the names of 100 people then we can create an array of the string type that can store 100 names. String[] array = new String[100];