Lecture Outline
- Arrays are not resizeable. To add something to an already full array, we must create a new array and copy the contents of the old array into the new array
- ArrayLists are arrays that are resizeable and dynamic. You can easily add and remove stuff without needing to worry about resizing (the ArrayList library handles all the hard work for you!)
- ArrayList methods: .add(), .get(), .remove(), .isEmpty()
- ArrayList documentation: https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html
Lecture Recording
Lecture Slides
Code