Lecture 11
20
ArrayList API
•can store:      any Object, not primitive types 
•declaration:  ArrayList myList
•creation:       myList = new ArrayList( )
•put at end:    myList.add( obj )
•put at index: myList.add( index, obj )
–moves later entries down the list
•get:               (Type)myList.get( index )
–cast to proper Type after get
•replace:        myList.set( index, obj )
•remove:       myList.remove( index )
•size:             myList.size( )
•looping:       for( ; ; )11