Is it possible to specify both upper and lower bound constraints on type parameters in Java?
- by Hosam Aly
Is it possible to specify both upper and lower bound constraints on type parameters in Java?
I found a conversation in Sun's forum in which this issue was discussed (apparently before the generics feature was finalized), but there was no final answer.
In summary, is there a valid syntax to do this:
public class MyClass<T extends Number super Integer>
?