Generic Constructors QuizS2C Home « Generic Constructors Quiz
Generics Quiz 10
The quiz below tests your knowledge of the material learnt in Generics - Lesson 10 - Generic Constructors.
Question 1 : Is the following code snippet a valid example of a generic constructor?
public CubeNumber (T number) <T extends Number> { ... }
- When declaring a generic constructor in a non-generic class we have to declare the generic type BEFORE the constructor name so the code is invalid.
Quiz Progress Bar
Quiz 1
Generic Basics
Quiz 2
Raw/Generic Type
Quiz 3
Generic Interfaces
Quiz 4
Generic Classes
Quiz 5
Bounded Type
Quiz 6
Unbounded Wildcard Type
Quiz 7
Upper Bounded Wildcard Type
Quiz 8
Lower Bounded Wildcard Type
Quiz 9
Generic Methods
What's Next?
That's it for the generic quizzes, the next set of quizzes are on streams.