Module Overview
This module introduces the Java Collections Framework and explains how it helps developers store, organise and manage groups of objects efficiently.
Learners will explore different collection types, including ArrayList, LinkedList, HashSet, TreeSet, HashMap and TreeMap.
The module also covers iterators and the differences between List, Set and Map.
These concepts help learners select suitable data structures for storing information, retrieving records and managing application data.
What Will Be Covered
14.1 ArrayList
Understanding the purpose of ArrayList in Java.
Exploring how ArrayList stores and manages elements.
Creating and initialising ArrayList objects.
Adding elements using add().
Accessing elements using get().
Updating and removing elements.
Iterating through ArrayList collections.
Applying ArrayList to manage lists of application records.
14.2 LinkedList
Understanding the structure and purpose of LinkedList.
Exploring how LinkedList stores elements.
Creating and initialising LinkedList objects.
Adding and removing elements.
Accessing and updating stored elements.
Understanding LinkedList operations.
Exploring the differences between ArrayList and LinkedList.
Applying LinkedList to manage dynamic collections of information.
14.3 HashSet
Understanding the purpose of HashSet.
Exploring how HashSet stores unique elements.
Creating and initialising HashSet objects.
Adding and removing elements.
Checking whether an element exists using contains().
Understanding how HashSet handles duplicate values.
Iterating through HashSet elements.
Applying HashSet to manage unique records.
14.4 TreeSet
Understanding the purpose of TreeSet.
Exploring how TreeSet stores unique elements in sorted order.
Creating and initialising TreeSet objects.
Adding and removing elements.
Understanding natural ordering and sorted collections.
Retrieving elements from TreeSet.
Comparing TreeSet with HashSet.
Applying TreeSet to organise unique information in sorted order.
14.5 HashMap
Understanding the purpose of HashMap.
Exploring key-value pairs in Java.
Creating and initialising HashMap objects.
Adding entries using put().
Retrieving values using get().
Updating and removing key-value pairs.
Checking for keys and values.
Applying HashMap to manage information using unique identifiers.
14.6 TreeMap
Understanding the purpose of TreeMap.
Exploring how TreeMap stores key-value pairs in sorted key order.
Creating and initialising TreeMap objects.
Adding, retrieving and updating entries.
Removing key-value pairs.
Understanding how TreeMap maintains sorted keys.
Comparing TreeMap with HashMap.
Applying TreeMap to organise key-based information.
14.7 Iterator
Understanding the purpose of Iterator in Java.
Exploring how iterators access collection elements.
Creating iterators using iterator().
Accessing elements using hasNext() and next().
Removing elements using the iterator's remove() method.
Understanding how iterators support collection traversal.
Applying iterators to process stored records.
14.8 Difference Between List, Set and Map
Understanding the purpose of List, Set and Map interfaces.
Exploring how List stores ordered collections and permits duplicate elements.
Understanding how Set manages unique elements.
Exploring how Map stores information as key-value pairs.
Comparing how each collection handles duplicate values.
Understanding element access and retrieval methods.
Selecting suitable collection types based on application requirements.
Skills You Will Gain
Understanding the Java Collections Framework.
Creating and managing ArrayList and LinkedList objects.
Storing unique elements using HashSet and TreeSet.
Managing key-value pairs using HashMap and TreeMap.
Adding, retrieving, updating and removing collection elements.
Iterating through collections using Iterator.
Understanding the differences between List, Set and Map.
Selecting appropriate collection types for different data requirements.
Organising and processing application data using Java collections.
Learning Outcomes
By the end of this module, learners will be able to:
Select suitable collection types to manage business information such as customer records, employee details and product data.
Use ArrayList and LinkedList to store and manage dynamic lists of application records.
Apply HashSet and TreeSet to maintain unique information and organise records.
Use HashMap and TreeMap to manage information through key-value relationships.
Retrieve, update and remove stored elements based on application requirements.
Apply iterators to process collection elements systematically.
Choose between List, Set and Map based on data structure and retrieval requirements.
Develop Java applications that manage business records efficiently using appropriate collection structures.
Certification Alignment
This module develops Java Collections Framework knowledge that supports the broader learning pathway towards the Oracle Certified Professional: Java SE 17 Developer certification.
The topics covered help learners understand collection interfaces, commonly used collection classes, data storage structures and collection traversal within Java applications.
Continue to the Next Module
Continue to Module 15: Multithreading to learn how Java handles concurrent execution using threads, explore the thread life cycle, create threads using the Thread class and Runnable interface, and understand thread methods and synchronisation.
Still need help?
Contact us