Transform HashMap in Java 8

In this post, we will see how to transform HashMap key-value pairs from one Type to another Type in Java 8.

Immutable Set in Java

In this post, we will discuss various methods to create immutable set in Java. Immutable Sets have many advantages over their mutable siblings, like they are thread-safe, more memory-efficient and can be passed to untrusted libraries without any side effects.

Initialize Set in Java

In this post, we will discuss various methods to initialize set in Java in a single line.

Find the index of an element in an array in Java

In this post, we will see how to find the index of an element in a primitive or object array in Java.   The solution should either return the index of first occurrence of the required element, or -1 if the element is not present in the array.