I have to remove duplicated objects in a List. It is a List from the object Blog that looks like this:
public class Blog { private String title; priv
Use set:
yourList = new ArrayList(new LinkedHashSet(yourList));
This will create list without duplicates and the element order will be as in original list.
Just do not forget to implement hashCode() and equals() for your class Blog.
hashCode()
equals(