public class Test {
public static void main(String[] args) {
List<Integer> list = new ArrayList<Integer>();
list.add(100);
list.add(200);
list.add(300);
list.add(200);
Set<Number> set = new HashSet<Integer>(list);
System.out.println(set.size());
}
}
Login in to like
Login in to comment