Actual return type is List<? Super Integer>.Number is super class of Integer then
Why it is giving compilation error�?
Actually the compiler cant check whether the returned one is really a List<Number>. When List<? Super Integer> is used as return type, the method can return a List of any super type of Integer. So it can be List<Number> or List<Object> or some other super type of Integer.
So you can just assign the returned value to List<Number>!
Actually you can assign the returned value only to List<?> or List<? Super Integer>!
Hope this helps!
[ November 27, 2008: Message edited by: M Srilatha ]