Remove Duplicate Objects from a List using Java

In this post, I will show you how to remove duplicate objects from a List using Java’s Comparator interface implementation based on multiple fields in a POJO.

Prerequisites

The following configurations are required in order to run the application

Eclipse
JDK 1.8
Have maven installed and configured
Junit, Mockito, PowerMockito dependency in pom.xml

Now we will see the below steps how to create a maven based Java project in Eclipse Continue reading “Remove Duplicate Objects from a List using Java”

Find Duplicate Objects in a List using Java

In this post, I will show you how to find duplicate objects in a List using Java’s Comparator interface implementation based on multiple fields in a POJO.

Prerequisites

The following configurations are required in order to run the application

Eclipse
JDK 1.8
Have maven installed and configured
Junit, Mockito, PowerMockito dependency in pom.xml

Now we will see the below steps how to create a maven based Java project in Eclipse Continue reading “Find Duplicate Objects in a List using Java”