Collections Archive

Java Array to Set

In this post, we will learn java array to set conversion. There are many ways to convert array to set. 1. Using Java 8’s Stream If you are using Java 8, I would recommend using …

Java Set to Array

In this post, we will learn java set to array conversion. There are many ways to convert set to an array. 1. Using Java 8’s Stream If you are using Java 8, I would recommend …

Java Collection to List

In this post, we will see how to convert Java Collection to List. There are many ways to do it, we will see two ways here. Using ArrayList constructor Above ArrayList‘s constructor creates a …

Java Collections shuffle

Shuffle method is to permute passed list with default or specified randomness. Syntax Example : Let’s see both the function with the help of example. When you run above program, you will get below …

Collections in java

In this tutorial, we will see  about Collections in java. Collection framework is core part of java programming language. It is used in almost all the applications. Collections framework provides a way to store and …