Skip to content

Topic 3: Arrays, Lists & Autoboxing

Understanding Java's core data structures — from fixed-size arrays to dynamic lists, wrapper classes, and enum types.


Topic Structure

Document Purpose Status
Part 1 — Arrays Array fundamentals, java.util.Arrays, multi-dimensional arrays, varargs Complete
Part 2 — ArrayList Collections intro, ArrayList CRUD, searching, sorting, Array ↔ ArrayList conversion Complete
Part 3 — LinkedList & Iterators LinkedList as List/Queue/Deque/Stack, Iterator, ListIterator, Travel Itinerary challenge Complete
Part 4 — Autoboxing, Unboxing & Enums Wrapper classes, autoboxing/unboxing, Banking challenge, enum types & custom methods Complete
Book Reading Effective Java insights (Items 28, 34–39) Complete
Summary Combined final understanding Complete

What You'll Master

  • Arrays — Declaration, initialization, java.util.Arrays utilities, multi-dimensional arrays, varargs
  • ArrayList — Resizable arrays, CRUD operations, searching, sorting, List.of() vs Arrays.asList()
  • LinkedList — Doubly linked list, Queue/Deque/Stack interfaces, Big O performance comparison
  • IteratorsIterator and ListIterator, safe modification during iteration, bidirectional traversal
  • Autoboxing & Unboxing — Primitives vs wrapper classes, automatic conversions, common pitfalls
  • Enums — Predefined constants, name()/ordinal()/values(), switch statements, custom methods

Resources

Primary Course

Book Reference

  • Effective Java by Joshua Bloch — Items related to Lists and Autoboxing

Course Sections Covered

Section Lectures Part
Section 9: Arrays 13 lectures Part 1
Section 10: Lists & Autoboxing Lectures 1–6 Part 2
Section 10: LinkedList & Iterators Lectures 7, 9–13 Part 3
Section 10: Autoboxing & Enums Lectures 15–18, 20–21 Part 4

Key Internals to Understand

  • How arrays store elements contiguously in memory (cache-friendly access)
  • ArrayList's dynamic resizing strategy (grow by 50%, amortized O(1) add)
  • LinkedList's node-based memory layout (non-contiguous, pointer overhead)
  • Why Iterator.remove() is safe during iteration but List.remove() throws ConcurrentModificationException
  • Autoboxing: when the JVM inserts Integer.valueOf() and intValue() calls
  • Integer cache: Integer.valueOf() caches values [-128, 127] (identity vs equality trap)
  • Enum's implementation as a class with public static final instances

Progress Tracker

  • Complete Tim's course Section 9 (Arrays)
  • Complete Tim's course Section 10 (Lists, Iterators, Autoboxing, Enums)
  • Write Part 1 topic notes (Arrays)
  • Write Part 2 topic notes (ArrayList)
  • Write Part 3 topic notes (LinkedList & Iterators)
  • Write Part 4 topic notes (Autoboxing, Unboxing & Enums)
  • Read Effective Java related items
  • Complete book reading notes
  • Synthesize final summary

Last Updated: 2026-02-11