This lecture is a quick, hands-on overview of Java collections. We’ll discuss why fixed-size arrays are not enough, how collections help, and how to choose between
List,
Set and
Map. We’ll show practical examples with
ArrayList and
HashMap, compare arrays with collections (operations
add(),
remove(),
contains(), sorting via
Collections.sort()), and finish by covering common pitfalls: raw types, imports, confusion between
length and
size(), order expectations, and primitives in collections.