Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What does the Set Interface prevent in a collection?
Consider the unique nature of elements.
What implementation of Set maintains the order of insertion?
Think about how elements are added.
What does the Set interface guarantee?
Think about what makes a Set different from a List.
True or False: A LinkedHashSet preserves the insertion order.
Recall how elements are organized.
You are building a contact application that must ensure that no duplicate emails exist. Which Set implementation would you choose and why?
Think about access speed versus order preservation.
Write a Java method that accepts a List of integers and returns a Set containing only the unique integers.
Play with the HashSet constructor that takes a collection.
5 more questions in this section. Enroll free to practise them all.
Enroll free