I'm trying to do something like the following, but the compiler complains when I do:
class A {}
interface B {}
ArrayList<? extends A implements B> list;
I've also tried
ArrayList<? extends A & B> list;
Why isn't this legal? The Java docs specify an example like this
class C<T extends A & B> {}
So why not allow it in a type definition?