What's New in JAVA 8
Finally Java 8 released under oracle leadership with many features and enhancements. Though some of the popular JSR's like JSR 294 (Jigsaw) are deferred again to next release, Java 8 still be the largest ever upgrade to java after it was introduced in 1996. Lets see one of those improvements. Performance improvement of java.util.HashMap under high hash-collision conditions : Just to give a little background : HashMap is used to store key-value pairs in no.of buckets technically 'Entry' objects . Entry is an inner class of HashMap. Please click here to see the source code in java 7. Each bucket has a unique number called hash code. When you try to put a key-value pair into the map, the hashmap will look at the hash code of the key, and store the pair in the bucket of which the identifier is the hash code of the key. Let's say if hash code of two keys are same then hash-collision occurs. Till now (prior to Java 8), hash collision is addressed by creati