could you please tell me..
How to remove duplicates from list of objects by id In java
could you please tell me..
How to remove duplicates from list of objects by id In java
for(int id=0;i<list.size();i++)
{
object = list.get(i);
for(int j; j<list.size();j++)
{
object1 = list.get(j);
if(object == object1 && id != j){
list.remove(j);
}
}
}