Below you will find pages that utilize the taxonomy term “whatsnew”
Dec, 2014 - Post
HashMap Performance Improvement in Java 8
Hash collision degrades the performance of HashMap significantly. Java 8 has introduced a new strategy to deal with hash collisions, thus improving the performance of HashMaps. Considering this improvement in Java 8 for hash collisions, existing applications can expect performance improvements in case they are using HashMaps having large number of elements by simply upgrading to Java 8.
Earlier, when multiple keys ends up in the same bucket, then values along with their keys are placed in a linked list.
read more
Dec, 2014 - Post
Introduction to Java Lambda Expression
After Java 8, developers can apply functional programming constructs in a pure Object-Oriented programming language through lambda expressions. Using lambda expression sequential and parallel execution can be achieved by passing behavior into methods. In Java world lambdas can be thought of as an anonymous method with a more compact syntax. Here compact means it is not mandatory to specify access modifiers, return type and parameter types while defining the expression.
read more
Dec, 2014 - Post
Introduction to Java Stream API
Prior to JDK 8, collections can only be managed through iterators with the use of for, foreach or while loops. It means that we instruct a computer to execute the algorithm steps.
int sum(List<Integer> list) { Iterator<Integer> intIterator = list.iterator(); int sum = 0; while (intIterator.hasNext()) { int number = intIterator.next(); if (number > 5) { sum += number; } } return sum; } The above approach has the following tailbacks:
read more