I have a LinkedList
in java and I would like to store items that are repeated in the container in another container, How could I find out? Any clues?
public Set<Cancion> dameCancionesRepetidas(){
SortedSet<Cancion> canciones = new TreeSet <Cancion>();
/**CODIGO*/
return canciones;
}
I have a container that we suppose has Song1, Song1, Song3, Song4, Song4.
Well, I want another container to return Song1, Song4, because they are the only ones that are repeated. I do not know if I explain myself well