Monday, 7 August 2017

collections - Easiest way to convert a List to a Set in Java



What is the easiest way to convert a List to a Set in Java?


Answer



Set foo = new HashSet(myList);


No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...