Promotion
CodeGym University
Java FullStack
Learning
Courses
Tasks
Surveys & Quizzes
Games
Help
Schedule
Community
Users
Forum
Chat
Articles
Success stories
Activity
Reviews
Subscriptions
Light theme
Group
Reviews
About us
Start
Start learning
Start learning now
Articles
Authors
All groups
All Articles List
CodeGym
/
Java Blog
/
Java Collections
Java Collections
288 members
Leaderboard
Popular
New
Old
John Selawsky
Java Collections
November 18, 2020 at 11:06 AM
HashSet contains() Method in Java
What is a HashSet? HashSet is a built-in datatype in Java, and in layman terms you can say “HashSet is an unordered collection of unique elements.” Have a look at a basic example. HashSet extends (extends means a class is inherited from another class) AbstractSet and...
Volodymyr Portianko
Java Collections
May 6, 2022 at 11:59 AM
LinkedHashSet in Java
Speaking of the LinkedHashSet class in Java, we need to mention that it implements the Set interface. LinkedHashSet creates a collection that stores elements in a hash table but maintains the insertion order of elements unlike its HashSet counterpart...
Volodymyr Portianko
Java Collections
December 24, 2024 at 8:56 AM
How to create a dictionary in Java
If you need to create a dictionary in a Java program, the most logical way to solve this problem is to use the dictionary data structure. This data structure allows you to store information in the form "key - value". Java has a special Dictionary...
Artem Divertitto
Java Collections
November 18, 2020 at 10:49 AM
Queue poll() Method in Java with Examples
Just like the name implies, Queue is a common data structure in Java following the First In First Out (FIFO) insertion order. You can easily imagine it as a queue at a grocery store. The sooner you enter, the sooner you leave. It means the element...
Artem Divertitto
Java Collections
October 5, 2023 at 5:48 AM
Max Heap in Java
In Java, there are many different types of data structures. The heap is based on a tree structure called a binary tree. A binary tree consists of nodes, each of which can have a maximum of 2 child nodes. A binary tree consists of a parent node which can have...
Oleksandr Miadelets
Java Collections
September 9, 2020 at 10:45 AM
Min Heap in Java with Examples
Before we get started, it is assumed that you know about a Binary Tree (in a binary tree, each node stores a key greater than all the keys in its left subtree and less than all the keys in its right subtree). Whereas, a Binary Heap is a complete binary tree which satisfies either the min-heap or max-heap ordering property...
Aditi Nawghare
Java Collections
February 9, 2025 at 4:27 PM
Enhanced for loop in Java
If you're a Java developer, you've probably come across a situation where you need to iterate over an array or a collection. In the past, this required writing a lot of boilerplate code to set up a loop and iterate over the elements. However, Java has introduced an enhanced for loop...
Oleksandr Miadelets
Java Collections
February 13, 2025 at 1:18 PM
TreeSet in Java
Java provides a vast set of data structures for efficiently working with element collections. One such data structure is TreeSet, an implementation of a red-black tree in Java...
Vasyl Malik
Java Collections
February 17, 2025 at 2:50 PM
Java Tuple
Tuple are fundamental data structures found in many programming languages. In this article, we will delve into what tuples are, their various use cases, and explore how they can be...
Jesse Haniel
Java Collections
December 30, 2024 at 10:19 AM
How to Sort a List in Java
Sorting arrays and lists is one of the most important problems of programming in general. That’s why it’s been solved in different ways a long time ago...
Artem Divertitto
Java Collections
June 6, 2022 at 11:46 AM
Java Vector
Probably you've already come across arrays in Java, and you know that one of their main drawbacks is size constancy. Once you've created an array of a certain size, you can't change that later. There are several Java Collection framework classes in the Java language that solve this problem...
1
2
3
4
Please enable JavaScript to continue using this application.