- Details
- Written by Nam Ha Minh
- Last Updated on 05 March 2024   |   Print Email
If you're looking for a complete guide to learn how to use collections in Java programming language, this page is exactly what you need. Or if you're an experienced Java developer who wants to refresh your knowledge in Java collections and generics, you've also come to the right place.You know, Java Collections framework provides a set of reusable data structures and algorithms that make programmer's jobs easier. Any Java programmers must learn to use collections fluently, which help creating robust and efficient applications of any kinds because data structures are the heart of any computer programs. While Java Collections framework provides reusuable data structures (List, Set, Map, Queue, ...), generics offer type safety with regard to using the collections in the right manner. Plus, Java Stream APIs provide convenient and flexible ways to operate on elements in collections. That's why you will learn Java collections and generics together, and use Java Stream APIs for processing data in the collections.
1. Getting started with Java Collections & Generics for beginners:
If you're new to Java Collections framework and Generics, check these articles first. You will understand the key concepts and overview of how collections and generics are designed in the Java programming language.
2. Java List Tutorials:
Use Lists to store elements that will be accessed via index, and duplicate elements allowed. Elements are usually stored in the order they added into a List.
3. Java Set Tutorials:
Sets are used when the order of elements does not matter and no duplicate elements allowed.
4. Java Map Tutorials:
Maps are used when you need a key-value mapping data structure.
5. Java Queue Tutorials:
You use Queues in producer-consumer processing, i.e. holding elements prior to processing and remove elements afterward.
6. Java Arrays Tutorials:
Check the follow articles to learn more about using arrays in the Java programming language, as well as conversion from arrays to collections.
7. Java Collection Iteration Tutorials:
Learn how to iterate over elements in collections properly
8. Java Streams Tutorials:
Learn how Java Stream APIs can simplify operations on elements in a collection.
9. Advanced Java Collections Tutorials:
It's recommended to get familiar with advanced concepts like equals, hashCode, object ordering, comparator, etc to use Java collections more efficiently
10. Advanced Java Generics Tutorials:
These articles help you understand advanced concepts in Java Generics:
11. Miscellaneous Java Collection Tutorials:
Learn how to use the utility classes for common operations on collections, so you won't re-invent the wheel.
Following these tutorials is enough to get familiar with Java collections and use the APIs in your daily coding. If you want to learn deeper, I recommend you check the
Java Generics and Collections book that covers everything from most basic uses to the strangest corner cases.
References:
About the Author:
Nam Ha Minh is certified Java programmer (SCJP and SCWCD). He began programming with Java back in the days of Java 1.4 and has been passionate about it ever since. You can connect with him on
Facebook and watch
his Java videos on YouTube.