CodeGym University
Learning
Course
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
144 members
Leaderboard
Popular
New
Old
Pavlo Plynko
Java Collections
8 September 2020 6:59
Convert List to Array in Java
List and arrays are two ways to store data in Java that you will use quite often. In projects where you need to store data without any sort of file handling, list and arrays let you store data throughout the execution of your program. We’ll be using Class ArrayList...
Milan Vucic
Java Collections
18 November 2020 11:44
Sublist() Method in Java: ArrayList and List
The Collections Framework is a very popular component in Java API. List interface and ArrayList class are probably the most important tools in the Collections Framework. subList is a method in the List interface that lets you create...
Artem Divertitto
Java Collections
21 December 2021 12:14
Java ArrayList addAll() method
If you need to add all the elements of one ArrayList () collection to another, you can use the addAll() method of the Java ArrayList class. In this article, I’m going to explain how this method works and provide some code examples...
Volodymyr Portianko
Java Collections
4 March 2022 11:57
How to use entrySet() method in Java
What is the entrySet() method in Java? The “HashMap” class provides the java.util.HashMap.entrySet() method in Java. It is used to create and then return a ‘set’...
Milan Vucic
Java Collections
8 August 2022 12:15
Java Stack
Stack in Java usually means the class from Collection Framework that implements the List interface. It works on the principle of the Stack data structure, which is used to organize one of the types of memory. Also it could be the part of memory to keep data, In this article we will...
Jesse Haniel
Java Collections
9 August 2022 9:47
Java Set
Set is an interface in the Java Collection Framework. You can use Java Set to implement unordered collections with unique elements. In this article, we are going to look at this interface and its implementations...
Milan Vucic
Java Collections
19 July 2022 13:40
How to iterate a Map in Java
In this post, we will learn different ways to iterate a Map in Java. Some of its common ways and how to use those with the help of examples. Before getting started, we assume you understand interfaces and maps in Java. However, here’s a quick recap for you...
Alex Vypirailenko
Java Collections
2 August 2022 10:17
Java List
The Java Collection Framework contains very useful interfaces and classes that implement them for working with data structures. It can be said that this is one of the most important JDK frameworks. The List interface is very popular...
Aditi Nawghare
Java Collections
12 November 2019 11:28
Java Stack 101: Delving into the Stack Class
he Stack in Java is a data structure, much like a queue, array, linked list, or tree. Where it differs from the others is that the Java Stack is based on the Last In, First Out (LIFO) principle. What this means is that when you use the two commands to add and remove an element from the stack...
John Selawsky
Java Collections
18 November 2020 11:06
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
18 November 2021 7:29
HashMap computeIfAbsent() method in Java
Java 8, as many of us know, introduced the Stream API. This is a very useful toolkit, but it has a drawback, it does not include Maps. However, Java 8 added several useful methods to the Map interface itself to reduce the amount of "bad" code...
Volodymyr Portianko
Java Collections
12 January 2022 8:56
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...
Show more
1
2
3
4
Please enable JavaScript to continue using this application.