Convert a list into a set

    0

    7

    setlist
    Java Public Recipes

    convert a list into a set

    import java.util.Set;
    import java.util.List;
    
    Set<Object> newSet = new HashSet<>(myList);
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.