Tag: Java 9

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.