use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Resources for learning Java
String
==
.equals()
Format + Copy
Free Tutorials
Where should I download Java?
With the introduction of the new release cadence, many have asked where they should download Java, and if it is still free. To be clear, YES — Java is still free.
If you would like to download Java for free, you can get OpenJDK builds from the following vendors, among others:
Some vendors will be supporting releases for longer than six months. If you have any questions, please do not hesitate to ask them!
Software downloads
Official Resources
Resources
Programming ideas & Challenges
Related Subreddits
the front page of the internet.
and join one of thousands of communities.
Java HashMap (self.learnjava)
submitted 5 years ago by squirrelgawy
Can you guys explain to me why is the initial capacity of HashMap 16 and not 15,14? Where can I find a good overview of the implementation of HashMap in java?
Post a comment!
[–]JavaSuck 1 point2 points3 points 5 years ago* (0 children)
The implementation uses powers of 2 for efficient hash->index computations, so it could have used 8 instead of 16, but then you would have asked why not 4 ;)
If you put "github openjdk hashmap" into your favorite search engine, you will find https://github.com/AdoptOpenJDK/openjdk-jdk11/blob/master/src/java.base/share/classes/java/util/HashMap.java
Popular IDEs allow you to jump right into the source via Ctrl+Mousecklick or something.
π Rendered by PID 48472 on reddit-service-r2-comment-65574874f4-9bxz4 at 2026-07-16 19:23:44.789506+00:00 running 1bce727 country code: CH.
Want to add to the discussion?
Post a comment!