import java.util.HashSet;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.awt.*;
public class hash {
public static void main(String[] args) {
int[] paco = { 1, 2, 3, 4, 5, 5 }; //an array with duplicate items for the set
Arrays.asList(paco);
Set<Integer> set = new HashSet<Integer>(paco);
}
}
이것은 목록에서 hashSets를 만드는 데 익숙해지기위한 간단한 연습입니다. 생성자 HashSet의 INT ([]) 정의되지생성자 HashSet <Integer> (int [])이 정의되지 않았습니다.
그리고 이것에 대해 비정상적인 것은 무엇입니까? 실제로 javadoc에는 그러한 생성자가 없습니다. – Dici