I have an Arraylist like below where I get some values from database due to JOIN
Structure I am getting now
List<Account> accountList= new ArrayList<>();
accountList.add(new Account("123","ram","2023-05-09T13:30:00.000+00:00"));
accountList.add(new Account("123", "ram","2023-05-09T14:30:00.000+00:00"));
Desired Output after converting
accountList.add(new Account("123","ram","2023-05-09T13:30:00.000+00:00"));
My Pojo class Account.java
String id;
String name;
Date startDate;
I have to use streams for making this possible to get List of unique Account Objects based on id