Return to site

JAVA CERTIFICATION QUESTION: Generic objects and type erasure in Java

· java,ocp

Generics are a powerful construct—but there are formal rules and informal conventions around their declarations.

Given the following code, and assuming the numbers at the left are line numbers, not part of the source file:

Which one of the following is true? Choose one.

A. Line 11 fails to compile.

B. Line 12 fails to compile.

C. Line 13 fails to compile.

D. Line 14 fails to compile.

E. Compilation succeeds.





·ꓭ uoᴉʇdo sᴉ ɹǝʍsuɐ ʇɔǝɹɹoɔ ǝɥꓕ ·uoᴉsnʅɔuoꓛ


All Posts

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!