Java - easily convert array to set
Posted
by Peter
on Stack Overflow
See other posts from Stack Overflow
or by Peter
Published on 2010-06-17T18:23:56Z
Indexed on
2010/06/17
18:33 UTC
Read the original article
Hit count: 292
Hey,
I'd like to convert an array to a set in Java. There are some obvious ways of doing this (i.e. with a loop) but I would like something a bit neater, something like:
java.util.Arrays.asList(Object[] a);
Any ideas?
Cheers,
Pete
© Stack Overflow or respective owner