Convert a list into a set

    0

    9

    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
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.