Skip to content
Hard Java Core

In Java generics, what does 'List<? extends Number>' allow you to do with the list?

— Tests your understanding of this concept.

Answer Options

A Add Numbers and Integer objects; read as Number
B Read elements as Number; cannot add (except null)
C Add any Number subtype; read as Object only
D Neither read nor write — wildcard lists are completely locked

Want to see the correct answer?

Get the answer with a detailed explanation, plus practice 20+ more Java Core questions with adaptive quizzes and timed interviews.

See the Answer on Guru Sishya →

This question is from the Java Core topic (Programming Languages).

More Java Core Questions