Lecture Videos
  1  import java.util.*;
  2  
  3  public class TestLinkedHashSet {
  4    public static void main(String[] args) {
  5      // Create a linked hash set
  6      Set<String> set = new LinkedHashSet<>();
  7      
  8      // Add strings to the set
  9      set.add("London");
 10      set.add("Paris");
 11      set.add("New York");
 12      set.add("San Francisco");
 13      set.add("Beijing");
 14      set.add("New York");
 15  
 16      System.out.println(set);
 17  
 18      // Display the elements in the hash set
 19      for (String element: set)
 20        System.out.print(element.toLowerCase() + " ");
 21    }
 22  }