) cAL.clone();
}
}
Main Program:
public
class
ArrayListObj {
public
static
void
main(String[] args) {
//
TODO
Auto-generated method stub
ALOC myObject =
new
ALOC();
myObject.iAL.add("First item");
myObject.iAL.add("Second item");
System.
out
.println("There are this many items in the list: " + myObject.iAL.size());
System.
out
.println("The list is: " + myObject.iAL);
}
}
Once the program runs as expected, make the following changes:
3.1. Instantiate three ALOC objects: myObject1, myObject2, myObject3.
3.2. Create a list inside each object:
3.2.1. myObject1: a list of the animals you would most like to have as a pet
3.2.2 myObject2: a list of five courses you will take at the college. (It's okay to include courses you have already taken.)
3.2.3. myObject3: a list of foods you like to eat
3.3. For each object, output the length of the list and the contents of the list