Oracle
1Z0-804 · Question #39
Given the cache class:
The correct answer is B. Compilation fails at line 1. Compilation failure at line:1 Incorrect number of arguments for type Cache<T>; it cannot be parameterized with arguments <>illegal start of typetype cache.Cache does not take parameters.
Generics and Collections
Question
Given the cache class:
Exhibit
Options
- A101
- BCompilation fails at line 1.
- CCompilation fails at line 2.
- DCompilation fails at line 3.
How the community answered
(32 responses)- A6% (2)
- B75% (24)
- C16% (5)
- D3% (1)
Explanation
Compilation failure at line:1 Incorrect number of arguments for type Cache<T>; it cannot be parameterized with arguments <>illegal start of typetype cache.Cache does not take parameters.
Topics
#generics#bounded type parameters#wildcard#compilation error
Community Discussion
No community discussion yet for this question.
