<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">import java.util.*;
import java.util.HashSet;

public class SetEj1 {
   public static void main(String[] args)  {

      // Demostracion con HashSet
      Set&lt;String&gt; Colors_Set = new HashSet&lt;String&gt;();
      Colors_Set.add("Rojo");
      Colors_Set.add("Verde");
      Colors_Set.add("Azul");
      Colors_Set.add("Cian");
      Colors_Set.add("Magenta");
      // Visualiza el contenido
      System.out.print("Contenido:");
      System.out.println(Colors_Set);

      //Demostracion con TreeSet
      System.out.print("\nOrdenado despues de convertir a TreeSet:");
      Set&lt;String&gt; tree_Set = new TreeSet&lt;String&gt;(Colors_Set);
      System.out.println(tree_Set);
   }
}
</pre></body></html>