String Deduplication is an additional feature of G1 Garbage collector, introduced in JDK 8 - 20th update. Its aim is to reduce the Java Heap Live data set by deleting the duplicate instances of a String Object.
Double Colon(::) Operator is actually known as the Method Reference in Java. Noticeable advantages of Method Reference are that it makes the code more concise, readable and easy to follow.
With the Introduction of Java 8, Searching or Performing any operation on a Text Files is a whole lot easier. By leveraging Java 8 streams and couple of other Java.nio.file libraries, we can easily process and filter out big files in few steps.
Whenever there was a need to create a comma separated list of elements, we mostly used StringBuilder, or StringBuffer based on the use case. Well in Java 8, this kind of usage is addressed and developers added a Utility method inside the String class itself called the Join() method and a separate class StringJoiner in java.util for more sophisticated operations.
This mini-article on Java 8 – Optional class gives you an idea about Optional class and its most commonly used methods.
In Java 8, there are different ways to reference a constructor. Namely using Lambda and double colon operator.
Overview An Interface in Java has evolved a lot since it was first introduced in Java 1.0 and now with Java 8, we can even implement Static and Default methods inside our Interface. Let's take a look at the Java 8 implementation of both these methods; 1. Static Method Static method in an Interface is [...]