Promotion
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
Artem Divertitto
Java Collections
22 August 2022 8:22
Conversion of Array To ArrayList in Java
Arrays are an extension of the Container class in Java and can be useful as a way to temporarily hold a set of primitive data types when the quantity of data is specifically known. But Arrays are static when created, which means that when you create one, you cannot change the number of items it holds...
Oleksandr Miadelets
Java Collections
25 August 2022 7:54
Java Iterator
Imagine that you go to the library, and you want to find a particular book. How do you do it? If it’s non-fiction, there’s the Dewey Decimal System. If it’s fiction, they’re sorted in alphabetical order by their last name. Whatever you’re looking for, at some point, you have to go through the books one at a time until you...
Oleksandr Miadelets
Java Collections
22 June 2020 13:06
Java Queue Interface and its implementations
Here we are going to discuss the Java Queue interface. You’ll find out what Queue data structure is, how it is represented in Java, what methods are the most important for all queues. Also, what implementations of Queue are in Java language. After that, we take a closer look at the most important...
Milan Vucic
Java Collections
7 July 2020 13:03
Java Deque Interface
Java Deque is a data structure that combines an ordinary Queue and Stack. You may add and remove elements both to the head and to the tail of the Deque. In the “traditional” queue you add elements to the tail of the line (after the last element) and remove elements from the head of the queue...
Alex Vypirailenko
Java Collections
20 October 2021 13:50
How to Replace an Element in Java ArrayList
Simple arrays in Java do not offer any method to update or replace an element. Nevertheless in ArrayList replace is pretty convenient to implement using the set method...
John Selawsky
Java Collections
23 March 2022 12:01
How to update the value of an existing key in HashMap
You know that there is always a key and a value in HashMap or any other Map. Key is called a key for a reason, because you get the access to values by the key. The key is unique...
Jesse Haniel
Java Collections
22 June 2020 10:36
Java Priority Queue: not a classical queue
In this article we learn a priority queue, Java class, that implements Queue interface. What does a programmer know of regular Queue Interface? First of all, this interface is based on the FIFO principle or “first in first out”. That reminds a regular queue in its common meaning. You want to get coffee from McDrive?
Pavlo Plynko
Java Collections
21 January 2020 12:24
Java Hashtable
Java Hashtable class is one of the oldest members of Java Collection Framework. It is an implementation of mathematical hash table data structure. In Java hashtable internally contains buckets where the key/value pairs are stored. Hashtable is pretty similar to HashMap. The most significant difference between...
Volodymyr Portianko
Java Collections
1 August 2022 13:20
How to Print an Array in Java
Java provides Array data structure to store different elements of the same data type. The elements are stored in contiguous memory. To display the similar contents of the array, the elements are needed to be printed...
Vasyl Malik
Java Collections
23 November 2021 15:09
How to use keySet method in java.util.Map
If you need to get all the keys that your Map contains, you can use the really handy java.util.HashMap.keySet() method. In this article, we will explain how it works. As you know, the HashMap class implements the Map...
Vasyl Malik
Java Collections
18 August 2022 8:04
Collections in Java
A collection in java is represented as a container that groups all the elements into a single unit. For example, a mail folder (group of emails), a telephone directory (mapping of names to phone numbers)...
John Selawsky
Java Collections
7 March 2022 8:49
HashMap getOrDefault method in Java
What is the getOrDefault method for HashMaps in Java? “The getOrDefault method returns the value mapped to the specified key in a HashMap. If that key is not present then a default value is returned.”...
Show more
1
2
3
4
Please enable JavaScript to continue using this application.