Ever thought how hashmaps work internally in java ,, lets understand
So in java , array of LinkedLists is used to implement hashmap.
for example when we write
HashMaphmap=new HashMap<>();
hmap.put("sss",1);
when we intialize a hashmap a array of linkedlist is created of size 16
where each index of that array represents a linkedlist. Now when we put the value inside it , it takes the key and generates a hash value , then that hash value is converted to a index number by doing '&' operation with the length of the array
After that the data is stored at that index , as a node of linkedlist , SO the what data that node stores ?? (1)hashed value (2)key (3)value (4)next
Master the Magic of HashMap in Java!
Curious about how HashMap works behind the scenes?
๐ค Learn about hashing, buckets, and collision handling to boost your Java skills and optimize your applications for peak performance.
Ready to dive in? Expl
See More
2 replies9 likes
Prince Singh Chouhan
Front-end Developerย โขย 11m
#Array in #javascript:
Array in Javascript enables storing a collection of multiple items under a single variable name, and has members for performing common array operations. Arrays aren't primitives but are instead Array #objects with the followin
See More
0 replies2 likes
Somen's 8D world
Hey I am on Medialย โขย 1y
Array.reduce() is Goated the Swiss army knife
Summing Numbers: Using reduce() to calculate the sum of numbers in an array.
Flattening Arrays: Flattening a nested array into a single array.
Grouping Objects: Grouping objects based on a speci
See More
0 replies5 likes
Atharva Deshmukh
Daily Learnings...ย โขย 11m
The Stock Market Index
When we want to know about the trends in the market, we need to analyze few of the important companies in each industry. The important companies are pre-packaged and continuously monitored to give you this information. This pr
James Gosling, creator of Java, announced that he is retiring
0 replies8 likes
Dileep Kadiveti
IoT Student with a C...ย โขย 10m
[This post has been deleted by the creator]
2 replies4 likes
Prince Yadav
Co -founder at Trade...ย โขย 1y
Today I Learnt stack using Linked list and Array in C++.
Here is a Code of Stack Using Linked List.
0 replies5 likes
Tushar Aher Patil
Trying to do betterย โขย 2m
๐จ NSE launches a new sectoral index - Nifty Chemicals Index
Weight of each stock is capped at 33% and weight of top 3 stocks is capped at 62%
0 replies3 likes
Rohan Saha
Founder - Burn Inves...ย โขย 8m
I focused exclusively on trading the index this month, and fortunately, not a single stop loss was hit, thanks to God. I recognize that profits from the index are lower than those from stocks, but trading the index is somewhat easier in a competitive
Hi everyone,
I hope you're all doing well.
I'm reaching out on behalf of a friend who is currently seeking a job opportunity as a Java Developer having 3 years of hands-on experience in Java development.
If your company is hiring for Java Develope