标签:
public static void main(String[] args) { int[] nums = { 5, 6, 6, 6, 8, 8, 7 }; List<Integer> numList = new ArrayList<Integer>(); for (int i : nums) numList.add(i); Set<Integer> numSet = new HashSet<Integer>(); numSet.addAll(numList); System.out.println(numSet); }
标签:
原文地址:http://www.cnblogs.com/silianbo/p/4628655.html