void main() {
    Set<String> band = new LinkedHashSet<>(List.of("Ada", "Grace", "Alan"));
    Set<String> chorus = new LinkedHashSet<>(List.of("Grace", "Alan", "Katherine"));

    Set<String> everyone = new LinkedHashSet<>(band);
    everyone.addAll(chorus);
    IO.println(everyone);

    Set<String> both = new LinkedHashSet<>(band);
    both.retainAll(chorus);
    IO.println(both);

    Set<String> bandOnly = new LinkedHashSet<>(band);
    bandOnly.removeAll(chorus);
    IO.println(bandOnly);
}

// From Groundwork, chapter 9 (ch09-maps-and-sets), box 15.
// This example is from Groundwork, licensed CC BY-NC-SA 4.0.
// Run with: java ch09_15.java
