import java.util.ArrayList;import java.util.Date;import java.util.HashSet;import java.util.List;import java.util.Set;public class Main { public static void main(String[] args) { Set set = new HashSet(); set.add("A"); set.add(new Long(10)); set.add(new Date()); List list = new ArrayList(set); Object[] objects = list.toArray(); for (int i = 0; i < objects.length; i++) { Object object = objects[i]; System.out.println("Object = " + object); } }}