having:
public <T extends Foo> int(T a, T b) { }
Allows me to pass in a different type in a
and b
, if both implement the Foo
interface.
I think this would be better stated as:
public <T extends Foo, U extends Foo> int(T a, U b) { }
My question is: is there a way to achieve the first signature (that both a and b are the same type and that both implement the Foo
interface)?