UTILIZING THE METHODS OF THE ARRAYLIST CLASS


This lab focuses on the use of the methods in the ArrayList class. The methods in the ArrayList class which could be used are:
For example:

ArrayList<String> myList = new ArrayList<String>();

myList.add ("yes");
myList.add ("no");
myList.add ("maybe");
System.out.println(myList);

The output would be:

[yes, no, maybe]

If we then have:

myList.add ("blue");
myList.add ("red");
myList.remove ("no");
System.out.println(myList);

The output would be:

[yes, maybe, blue, red]

Note: There are many other methods in the ArrayList class than 
what is listed here.  You will learn about them and use them in labs to come.