nerdexam
Oracle

1Z0-851 · Question #2

A programmer has an algorithm that requires a java.util.List that provides an efficient implementation of add(0, object), but does NOT need to support quick random access. What supports these…

The correct answer is D. java.util.LinkedList. See the full explanation below for the reasoning.

Question

A programmer has an algorithm that requires a java.util.List that provides an efficient implementation of add(0, object), but does NOT need to support quick random access. What supports these requirements?

Options

  • Ajava.util.Queue
  • Bjava.util.ArrayList
  • Cjava.util.LinearList
  • Djava.util.LinkedList

How the community answered

(36 responses)
  • A
    3% (1)
  • B
    3% (1)
  • C
    11% (4)
  • D
    83% (30)

Community Discussion

No community discussion yet for this question.

Full 1Z0-851 Practice