Back to Course
Core Java

Java Collections

What is the Collections Framework?

Java's Collections framework provides ready-made, resizable data structures for storing groups of objects, more flexible than fixed-size arrays.

Common Collection Types

  • List (e.g., ArrayList): an ordered collection that allows duplicates.
  • Set (e.g., HashSet): a collection with no duplicate elements.
  • Map (e.g., HashMap): stores key-value pairs for fast lookup by key.

Why Testers Use Collections

Collections are used constantly in test automation — for example, storing a List of expected values, or a Map representing a JSON request payload before sending it via Rest Assured.

Ready to master real-world software testing?

Learn manual and automation testing hands-on with mentor-led sessions.

Explore Course