Objectives
- Instantiate an
ArrayList
- Use
add()
,get()
,set()
,remove()
, andsize()
- Iterate through an
ArrayList
using a for loop
ArrayList
add()
, get()
, set()
, remove()
, and size()
ArrayList
using a for loopArrayList
and add the following elements: "Butter", "Milk", "Cookies", "Chips", "Carrots"Size of the list: 3
Contents of the list:
Butter
Milk
Chips
Apples