ArrayLists and Iterators
32. End of Chapter
Answer:
No. Use the remove()
method, which will not create problematic null
s .
names.remove( 4 );
End of Chapter
You have reached the end this chapter. You may wish to review the following. Click on a subject that interests you to go to where it was discussed.
- ArrayList ArrayList class overview.
- ArrayList, constructors ArrayList constructors.
- ArrayList, capacity Capacity and size of a ArrayList.
- ArrayList, add() add() method.
- ArrayList, set() set() method.
- ArrayList, remove() remove() method.
- ArrayList, indexOf() indexOf() method.
- Iterator interface Iterators
- enhanced for loop Enhanced for loop
- autoboxing Autoboxing
- equals(), used with indexOf() Need to override the equals() method.