than its indexso the first element is at rank the second is at rank and so on sequence that supports access to its elements by their indices is called an array list (or vectorusing an older termsince our index definition is more consistent with the way arrays are indexed in java and other programming languages (such as and ++)we will be referring to the place where an element is stored in an array list as its "index,not its "rank(although we may use to denote this indexif the letter "iis being used as for-loop counterthis index concept is simple yet powerful notionsince it can be used to specify where to insert new element into list or where to remove an old element the array list abstract data type as an adtan array list has the following methods (besides the standard size(and isempty(methods)get( )return the element of with index ian error condition occurs if size( set(ie)replace with and return the element at index ian error condition occurs if size( add(ie)insert new element into to have index ian error condition occurs if size(remove( )remove from the element at index ian error condition occurs if size( we do not insist that an array should be used to implement an array listso that the element at index is stored at index in the arrayalthough that is one (very naturalpossibility the index definition offers us way to refer to the "placewhere an element is stored in sequence without having to worry about the exact implementation of that sequence the index of an element may change whenever the sequence is updatedhoweveras we illustrate in the following example example we show below some operations on an initially empty array list operation output add( ,