2017  Kodetalk | Feedback | Privacy Policy | Terms | About
userimage

Easiest way to convert a List to a Set? - Java

what is simplest and easiest way to convert a list to a set?
userimage

I think this is the simplest

Set<Animal> animals= new HashSet<Animal>(myList);

Answer is