Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
DSA
22.3k+ articles
Java
10.3k+ articles
Difference Between
4.2k+ articles
Java Programs
2.1k+ articles
Java-Collections
1.1k+ articles
Java-HashMap
140+ articles
java-hashset
79 articles
java-TreeMap
74 articles
Java-List-Programs
55 articles
java-map
39 articles
Java-Map-Programs
20 posts
Popular Articles
Recent Articles
How to Clone a Map in Java
Last Updated: 21 January 2019
Given a map, the task is to clone that map.Following are the 5 different ways to Clone a Map in Java.Example:{1=Geeks, 2=For, 3=Geeks} Me
...read more
Java
Java-HashMap
java-map
Picked
Java-Map-Programs
Difference Between ArrayList and HashMap in Java
Last Updated: 20 January 2022
ArrayList is a part of the collection framework and is present in java.util package. It provides us with dynamic arrays in Java. Though, it
...read more
Java
Technical Scripter
Java-Collections
Java-ArrayList
Java-HashMap
Technical Scripter 2018
Java-List-Programs
Java-Map-Programs
How to create a TreeMap in reverse order in Java
Last Updated: 25 October 2019
By default TreeMap elements in Java are sorted in ascending order of keys. However, we can create the TreeMap in reverse order using Collect
...read more
Java
Java-Collections
java-TreeMap
Picked
Java-Map-Programs
Similar Topics
DSA
22.3k+ articles
Java
10.3k+ articles
Difference Between
4.2k+ articles
Java Programs
2.1k+ articles
Java-Collections
1.1k+ articles
Java-HashMap
140+ articles
java-hashset
79+ articles
java-TreeMap
74+ articles
Java-List-Programs
55+ articles
java-map
39+ articles
How to check if a key exists in a HashMap in Java
Last Updated: 11 December 2018
Given a HashMap and a key in Java, the task is to check if this key exists in the HashMap or not.Examples:Input: HashMap: {1=Geeks, 2=ForGee
...read more
Java
Java-Collections
Java-HashMap
Java-Map-Programs
Difference between HashMap and HashSet
Last Updated: 06 April 2023
HashSet is an implementation of Set Interface which does not allow duplicate value. The main thing is, objects that are stored in HashSet mu
...read more
Java
Java-Collections
Difference Between
Java-HashMap
java-hashset
Java-Map-Programs
Java-Set-Programs
Program to Convert List to Map in Java
Last Updated: 19 June 2019
The List is a child interface of Collection. It is an ordered collection of objects in which duplicate values can be stored. Since List pres
...read more
Java
Technical Scripter
Java-Collections
java-list
java-map
Technical Scripter 2018
Java-List-Programs
Java-Map-Programs
Immutable Map in Java
Last Updated: 03 March 2023
ImmutableMap, as suggested by the name, is a type of Map which is immutable. It means that the content of the map are fixed or constant afte
...read more
Java
Java-Collections
Java - util package
java-guava
java-map
Java-Map-Programs
Count occurrences of elements of list in Java
Last Updated: 31 May 2022
Suppose we have an elements in ArrayList, we can count the occurrences of elements present in a number of ways.HashMapThis data structure us
...read more
Java
Java Programs
Java-HashMap
frequency-counting
java-TreeMap
java-hashset
java-list
Java-List-Programs
Java-Map-Programs
Difference between HashMap and ConcurrentHashMap
Last Updated: 06 August 2019
HashMap is the Class which is under Traditional Collection and ConcurrentHashMap is a Class which is under Concurrent Collections, apart fro
...read more
Java
Java-Collections
Java-HashMap
Java-Map-Programs
Sorting a HashMap according to keys in Java
Last Updated: 14 April 2025
We are given the details of marks scored by students in form of a HashMap, where the name of the student is the Key and the marks scored is
...read more
Java
Java-Collections
Java-HashMap
Java-Map-Programs
DSA
How to Iterate Any Map in Java?
Last Updated: 18 April 2025
In Java, a Map is a data structure that is used to store key-value pairs. Understanding how to iterate over the elements of a map plays a ve
...read more
Java
Java-Collections
Java-Map-Programs
Differences between TreeMap, HashMap and LinkedHashMap in Java
Last Updated: 25 March 2025
Prerequisite: HashMap and TreeMap in JavaTreeMap, HashMap and LinkedHashMap: What's Similar?All offer a key-value map and a way to iterate t
...read more
Java
Java-Collections
Difference Between
Java-HashMap
java-TreeMap
Java-LinkedHashMap
Java-Map-Programs
Internal Working of HashMap in Java
Last Updated: 22 April 2025
In this article, we will understand the internal workings of the HashMap in Java, also how the get() and put() method functions, how hashing
...read more
Java
Java-HashMap
Java-Map-Programs
HashMap and TreeMap in Java
Last Updated: 02 June 2023
HashMap and TreeMap are part of collection framework. HashMapjava.util.HashMap class is a Hashing based implementation. In HashMap, we have
...read more
Java
Java-Collections
Java-HashMap
java-TreeMap
Java-Map-Programs
Differences between HashMap and HashTable in Java
Last Updated: 23 January 2022
HashMap and Hashtable store key and value pairs in a hash table. When using a Hashtable or HashMap, we specify an object that is used as a k
...read more
Java
Java-HashMap
Java-HashTable
Java-Map-Programs
1
2
>>
Last
1
2
>>
Last
1
2
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !