Quiz: Collection Comparisons Questions
Browse questions from Quiz: Collection Comparisons. Each question has options and an explanation.
Questions — Page 1 of 2
- Which list is usually better for fast random access by index?
- ArrayList internally uses a resizable array.
- Which map is legacy synchronized and does not allow null keys or null values?
- HashMap allows one null key.
- Which principle describes a Stack?
- A Queue is usually FIFO.
- Which modern Java class is commonly preferred over legacy Stack for stack operations?
- java.util.Stack is the modern preferred stack implementation for most new Java code.
- You are solving BFS on a graph. Which collection should you usually use for the frontier?
- You need to count votes by candidate name. Which collection pattern is most direct?