String[] strs = {"ace"
,
"boom"
,
"crew"
,
"dog"
,
"eon";
Set<String> set= new HashSet<String>();
Collections.addAll(set, strs );
转为list也可以用上面方法,同时还可以用
List<String> list= Arrays.asList(strs);
String[] strs = {"ace"
,
"boom"
,
"crew"
,
"dog"
,
"eon";
Set<String> set= new HashSet<String>();
Collections.addAll(set, strs );
转为list也可以用上面方法,同时还可以用
List<String> list= Arrays.asList(strs);