I am reading an wildcard example in wildcard capture and helper methods in The Java tutorial. I don't understand why the compiler produces a capture error when compiled:
import java.util.List;
public class WildcardError{
void foo(List<?> i){
i.set(0, i.get(0));
}
}
Why does the compiler processes the iinput as being of type object?