simple neverthelessthey form the basis of techniques that are used repeatedly to build more sophisticated data structures these other structures may be more general than the array structure aboveof courseand often they will have lot more operations that they can perform than just add and remove but studying the concrete array data structureas we are doing nowis great starting point to understanding these other structuressince every data structure has to be implemented using concrete means in factlater in this bookwe will study java collections classarraylistwhich is more general than the array structure we are studying here the arraylist has methods to do lot of the things we will want to do with an arraywhile also eliminating the error that occurs when adding an object to full array the arraylist eliminates this error by automatically copying the objects into larger array if necessary rather than discuss this process herehoweverwe will say more about how this is done when we discuss the arraylist in detail sorting an array in the previous sectionwe worked hard to show how we can add or remove objects at certain index in an array while keeping the previous order of the objects intact in this sectionwe study way of starting with an array with objects that are out of order and putting them in order this is known as the sorting problem simple insertion-sort algorithm we study several sorting algorithms in this bookmost of which appear in as warm upwe describe in this section nicesimple sorting algorithm called insertion-sort in this casewe describe specific version of the algorithm where the input is an array of comparable elements we consider more general kinds of sorting algorithms later in this book