public class Main { public static void main(String[] args) {
Set<Object> set = new HashSet<Object>();
set.add("A");
set.add(new Long(10));
set.add(new Date());
List<Object> list = new ArrayList<Object>(set); for (int i = 0; i < list.size(); i++) {
Object o = list.get(i);
System.out.println("Object = " + o);
}
}
}