In java I have an arraylist that holds the following
List<IMyInterface>
I am returning it in a function
List<? extends IMyInterface> getList()
Now I wanna do the following
getList().add(MyElement)
where MyElement extends the interface.
What I get is a compile error that the method was expecting something else.
here it is:
add (capture ) in list cannot be aplied to (MyElement).
. though MyElement extends th IMyInterface
BTW: What is the word Capture in bold ? Thanks.