found the data we're storing in this array is type int we've chosen primitive type to simplify the coding generally the items stored in data structure consist of several fieldsso they are represented by objects rather than primitive types we'll see an example of this toward the end of this insertion inserting an item into the array is easywe use the normal array syntax arr[ we also keep track of how many items we've inserted into the array with the nelems variable searching the searchkey variable holds the value we're looking for to search for an itemwe step through the arraycomparing searchkey with each element if the loop variable reaches the last occupied cell with no match being foundthen the value isn' in the array appropriate messages are displayed"found or "can' find deletion deletion begins with search for the specified item for simplicity we assume (perhaps rashlythat the item is present when we find itwe move all the items with higher index values down one element to fill in the "holeleft by the deleted elementand we decrement nelems in real programwe' also take appropriate action if the item to be deleted could not be found display displaying all the elements is straightforwardwe step through the arrayaccessing each one with arr[jand displaying it program organization the organization of array java leaves something to be desired there is only one classarrayappand this class has only one methodmain(the program is essentially an old-fashioned procedural program let' see if we can make it easier to understand (among other benefitsby making it more object-oriented we're going to provide gradual introduction to an object-oriented approachusing two steps in the firstwe'll separate the data storage structure (the arrayfrom the rest of the program this remaining part of the program will become user of the structure in the second stepwe'll improve the communication between the storage structure and its user dividing program into classes the array java program essentially consisted of one big method we can reap many benefits by dividing the program into classes what classesthe data storage structure itself is one candidateand the part of the program that uses this data structure is