Loading…
Loading…
Ten exam-style questions on declaring generic classes, interfaces and records, generic method syntax, type erasure and its limits, overloading and overriding with generic types, shadowed type parameters and bounded type parameters, with explanations.
Practice questions for the article Java Generics: Generic Classes, Interfaces, Methods and Type Erasure.
When a question mixes generics with overloading or overriding, erase the type arguments first. Aim for at least 8 out of 10.
Quiz path: step 66. Take the quizzes in this order, after reading each article.
Previous quiz: Sequenced Collections (OCP 21)
Next quiz: Generic Wildcards and Bounds (OCP 21)
10 questions · pass at 68%
Check your understanding; you see the answers and explanations after submitting.
Discussion
Sign in to ask a question or share what you learned.