Can anyone explain me the meaning of following code fragment?
List <? extends Number > lst = new ArrayList<Integer> ();
I know the meaning of <? extends Number> but I feel like it is an unsafe declaration. If it is so, when is it unsafe? When retrieve things or when add things? What can we add to this ArrayList? Only Integers or any object that extends Number? What do we get out when we retrieve an object from this list? I know it was a passage but someone pelase help in detail.