Class<? extends Something>
Here’s my interpretation, it’s class template but the class ? means the name of the class is undetermined and it extends the Something class.
if there’s something wrong with my interpretation, let me know.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You are almost right.
Basically, Java has no concept of templates (C++ has).
This is called generics.
And this defines a generic class
Class<>with the generics’ attribute being any subclass ofSomething.I suggest reading up “What are the differences between “generic” types in C++ and Java?” if you want to get the difference between templates and generics.