Oracle
1Z0-851 · Question #250
A programmer must create a generic class MinMax and the type parameter of MinMax must implement Comparable. Which implementation of MinMax will compile?
The correct answer is A. class MinMax<E extends Comparable<E>> {. See the full explanation below for the reasoning.
Question
A programmer must create a generic class MinMax and the type parameter of MinMax must implement Comparable. Which implementation of MinMax will compile?
Options
- Aclass MinMax<E extends Comparable<E>> {
- Bclass MinMax<E implements Comparable<E>> {
- Cclass MinMax<E extends Comparable<E>> {
- Dclass MinMax<E
How the community answered
(20 responses)- A80% (16)
- B10% (2)
- C5% (1)
- D5% (1)
Community Discussion
No community discussion yet for this question.