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 is a Collection in Java?
Think of it as a container.
Name two core interfaces of the Java Collections Framework.
Consider common data structures.
What does a Collection in Java do?
Think of it like a box containing many items.
True or False: A List cannot contain duplicate elements.
Consider an example where you can have the same object multiple times.
Design a program that demonstrates the use of List, Set, and Map. Create a List to hold your favorite movies, a Set for unique genres, and a Map where the keys are movie titles and values are their release years.
Use ArrayList for movies, HashSet for genres, and HashMap for storing titles and years.
Explain the advantages of using the Set interface over List when handling a collection of user IDs in an application.
Consider what happens if a user enters their ID multiple times.
6 more questions in this section. Enroll free to practise them all.
Enroll free