Arrays are data structures capable of storing a number of different values of the same type. Each of these values is known as an element. The type of an array can be a simple type or can be a class. To refer to an individual element, an integer value, known as the index, is used to indicate the relative position of the element in the array.
Arrays are static data structures; after the array has been declared, the capacity of the array cannot be changed. Various practical problems can be solved using arrays. Searching involves finding an element in the array with a target value. Two important search algorithms are linear search and binary search. Sorting involves rearranging the elements of an array in some particular order of their values. In Java, arrays are considered objects; they need to be declared and created.