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.1k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Strings
3.2k+ articles
Java Programs
2.1k+ articles
Searching
1.7k+ articles
Hash
1.2k+ articles
Java-Collections
1.1k+ articles
frequency-counting
730+ articles
Java-HashMap
140+ posts
Popular Articles
Recent Articles
How to Iterate HashMap in Java?
Last Updated: 16 October 2021
HashMap is a part of Java’s collection providing the basic implementation of the Map interface of Java by storing the data in (Key, Value)
...read more
Java
Java Programs
Java-HashMap
Picked
Java HashMap getOrDefault() Method
Last Updated: 07 April 2025
When we work with Java's HashMap, one common problem occurs that is dealing with missing keys. If we try to fetch a value for a key that doe
...read more
Java
Java-Collections
Java - util package
Java-Functions
Java-HashMap
Picked
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
Similar Topics
DSA
22.3k+ articles
Java
10.1k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Strings
3.2k+ articles
Java Programs
2.1k+ articles
Searching
1.7k+ articles
Hash
1.2k+ articles
Java-Collections
1.1k+ articles
frequency-counting
730+ articles
Hashing in Java
Last Updated: 01 March 2023
In hashing there is a hash function that maps keys to some values. But these hashing function may lead to collision that is two or more keys
...read more
Java
Hash
Java Programs
Java-HashMap
java-hashset
Java-LinkedHashMap
Java-HashTable
Java-ConcurrentHashMap
java-LinkedHashSet
DSA
Java program to count the occurrence of each character in a string using Hashmap
Last Updated: 01 December 2022
Given a string, the task is to write a program in Java which prints the number of occurrences of each character in a string.Examples:Input:
...read more
Java
Java Programs
Java-HashMap
HashMap containsKey() Method in Java
Last Updated: 04 January 2025
The java.util.HashMap.containsKey() method is used to check whether a particular key is being mapped into the HashMap or not. It takes the k
...read more
Java
Java-Collections
Java - util package
Java-Functions
Java-HashMap
HashMap entrySet() Method in Java
Last Updated: 13 December 2024
The entrySet() method of the HashMap class in Java is used to create a set view of the mappings contained in the HashMap. This method allows
...read more
Java
Java-Collections
Java-HashMap
HashMap get() Method in Java
Last Updated: 04 January 2025
The java.util.HashMap.get() method of HashMap class is used to retrieve or fetch the value mapped by a particular key mentioned in the param
...read more
Java
Java-Collections
Java - util package
Java-Functions
Java-HashMap
Java HashMap keySet() Method
Last Updated: 16 January 2025
The keySet() method of the Java HashMap class is used to return a set containing all the keys in the map. This set is backed by the HashMap,
...read more
Java
Java-Collections
Java-HashMap
Java HashMap put() Method
Last Updated: 20 January 2025
The put() method of the Java HashMap class is used to add or update the key-value pairs in the map. If the key already exists in the map, th
...read more
Java
Java-Collections
Java-HashMap
Java HashMap remove() Method
Last Updated: 20 January 2025
The remove() method of the Java HashMap class is used to remove a key-value pair from the map based on the given key. If the key is found, t
...read more
Java
Java-Collections
Java-HashMap
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
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 in Java
Last Updated: 07 March 2025
In Java, HashMap is part of the Java Collections Framework and is found in the java.util package. It provides the basic implementation of th
...read more
Java
Java-Collections
Java - util package
Java-HashMap
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
3
4
5
6
7
8
>>
Last
1
2
3
4
5
6
>>
Last
1
2
3
4
>>
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 !