Arrays.asList()可以在这里解决问题。
String[] words = {"ace", "boom", "crew", "dog", "eon"};List<String> wordList = Arrays.asList(words);
Set<T> mySet = new HashSet<T>(Arrays.asList(words));
欢迎分享,转载请注明来源:内存溢出
Arrays.asList()可以在这里解决问题。
String[] words = {"ace", "boom", "crew", "dog", "eon"};List<String> wordList = Arrays.asList(words);
Set<T> mySet = new HashSet<T>(Arrays.asList(words));
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)