java - Why can't I pass an object of type T to a method on an object of type <? extends T>? -
In Java, let me assume that I have a container that has a list of class items: public class container & lt; T & gt; {Private list & amp; Lt; Item & lt;? T & gt; & Gt; item; Private T-value; Public Container (T Value) {this.value = value; } Public Zero addItem (item increases & lt;? T & gt; items) {items.add (item); } Public Zero doActions (Item (lt; items: item increases for items) {item.doAction (value);}}} Public abstract class items {public essence Deleting zero (T item);} returns the Eclipse error: the method doesAction (Capture # 1-Expands?) In Type Item Argument Argument (T) Is not applicable for I am reading generic examples and various postings, but I still can not understand why this permission Eclipse does not give any useful suggestions in its proposed reforms, either the variable value is type T, why will not it apply to ? . "post-text" itemprop = "text"> Take a look at the following programs Publ...