posted 15 years ago
In generics you must rememeber that if you have a List<class> reference it can only ever refer
to a List<class>, not a List which is a sub-type of class or a list which has the wild card character ?
(although for backward compatibilty as Raju says, it can refer to a an old-fasioned non-generic list,
but you will get a compiler warning).In this case the return of value of the method is a List<? extends Chewable>,
which is being assigned to a List<Chewable> and List<Meat>, which is illegal
Martin.