Reputation: 679
For this declaration
final Map<?, ?> qBuilders;
what does it mean?
Upvotes: 1
Views: 196
Reputation: 114767
It declares the class attribute qBuilders
. This variable must be initialized in a constructor and you can't assign another value to that attribute afterwards (but you can change the map keys and values - you just can't exchange the entire map).
Map
is a generic interface, <?,?>
are the type parameters for this attributes. ?
is a wildcard and just tells, that this map accepts any java type for keys and values.
Upvotes: 4
Reputation: 14988
While your question is fairly vague, the final
keyword, in the context of a variable, means the variable can only be assigned once. If the variable is a field of a class, it has to be assigned in the constructor of said class.
Upvotes: 0