In Java type arguments, does mean strictly subtypes only? or would E also suffice?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Both the lines compile without any error. Any function taking the list as a parameter understands that the objects in the list are of type E or a subtype of E.
Yes,
super
andextends
gives inclusive lower and upper bounds respectively.Here's a quote from Angelika Langer's Generics FAQ:
It's not strict;
E
would suffice.