Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

How to convert List to Set

Question posted by: ashi1290 (Newbie) on May 14th, 2008 12:26 PM
How can we convert List to Set
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
JosAH's Avatar
JosAH
Chief Editor
6,797 Posts
May 14th, 2008
12:30 PM
#2

Re: How to convert List to Set
Quote:
Originally Posted by ashi1290
How can we convert List to Set


Did you read the API documentation for the several implementing classes of the
Set interface? You can feed a Collection to the constructor. A List is a Collection.
It can't be easier.

kind regards,

Jos

Reply
Reply
Not the answer you were looking for? Post your question . . .
170,099 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Top Java Forum Contributors