package com.Swing; import java.util.Collection; import java.util.HashSet; import java.util.LinkedList; import java.util.Set; public class SetTest ... { /** *//** * @param args */ public static void main(String[] args) ...{ // TODO Auto-generated method stub Collection coll=new LinkedList(); coll.add(1); coll.add(2); coll.add(3); Set set=new HashSet(); set.addAll(coll); Object[] inte=set.toArray(); System.out.println(inte[0]); }}