Data Structures

ArrayList: Manipulation

You created an ArrayList in the last exercise to store temperature data, but it does not contain any values yet.

Let's add some values of type Integer to the ArrayList, one by one, like this:

ArrayList<Integer> quizGrades = new ArrayList<Integer>();

In the example above, we call the add method on quizGrades. The add method adds integers to the ArrayList. The values 95, 87, and 83 are added to the list.

Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.